Fix ip_output() on point-to-point links
authorrstone <rstone@FreeBSD.org>
Mon, 24 Oct 2016 22:11:33 +0000 (22:11 +0000)
committerrstone <rstone@FreeBSD.org>
Mon, 24 Oct 2016 22:11:33 +0000 (22:11 +0000)
commit66911849cbd992270c40ae2ca9281562205fc331
tree2d74f59d7cd17e2b8e96c92c8916d8afc0d22609
parent00202d165130cb0a9f9caf889cccbe7e2bdc86eb
Fix ip_output() on point-to-point links

In r304435, ip_output() was changed to use the result of the route
lookup to decide whether the outgoing packet was a broadcast or
not.  This introduced a regression on interfaces where
IFF_BROADCAST was not set (e.g. point-to-point links), as the
algorithm could incorrectly treat the destination address as a
broadcast address, and ip_output() would subsequently drop the
packet as broadcasting on a non-IFF_BROADCAST interface is not
allowed.

Differential Revision: https://reviews.freebsd.org/D8303
Reviewed by: jtl
Reported by: ambrisko
MFC after: 2 weeks
X-MFC-With: r304435
Sponsored by: Dell EMC Isilon
sys/netinet/ip_output.c