ae 9c4008f018 Set M_BCAST and M_MCAST flags on mbuf sent via divert socket.
r290383 has changed how mbufs sent by divert socket are handled.
Previously they are always handled by slow path processing in ip_input().
Now ip_tryforward() is invoked from ip_input() before in_broadcast() check.
Since diverted packet lost all mbuf flags, it passes the broadcast check
in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast
packet is forwarded to the wire instead of be consumed by network stack.

Add in_broadcast() check to the div_output() function. And restore the
M_BCAST flag if destination address is broadcast for the given network
interface.

PR:		209491
MFC after:	1 week
2017-05-17 09:04:09 +00:00
..
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-03-14 20:57:54 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2016-03-31 00:53:23 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-04-03 02:44:40 +00:00
2017-02-28 23:42:47 +00:00
2017-03-14 20:57:54 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2016-12-26 11:06:41 +00:00
2016-12-06 10:21:25 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-06 10:21:25 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2017-04-29 19:20:50 +00:00
2016-12-26 11:06:41 +00:00
2016-12-06 10:21:25 +00:00
2016-12-26 11:06:41 +00:00
2016-12-26 11:06:41 +00:00
2017-02-28 23:42:47 +00:00
2016-12-26 11:06:41 +00:00
2016-12-06 10:21:25 +00:00
2017-04-29 19:20:50 +00:00
2017-04-29 19:20:50 +00:00
2017-04-29 19:20:50 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00