In the output path, mask off M_BCAST|M_MCAST so as to prevent incorrect

addressing if a packet is later re-encapsulated and sent to a
non-broadcast, non-multicast destination after being received on the
ng_ksocket input hook.

PR:		106999
Submitted by:	Kevin Lahey
MFC after:	4 weeks
This commit is contained in:
Bruce M Simpson 2007-02-09 12:35:29 +00:00
parent 3467360dfd
commit 4ae54e2fad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166585

View File

@ -919,6 +919,9 @@ ng_ksocket_rcvdata(hook_p hook, item_p item)
(stag->id == NG_NODE_ID(node) || stag->id == 0))
sa = &stag->sa;
/* Reset specific mbuf flags to prevent addressing problems. */
m->m_flags &= ~(M_BCAST|M_MCAST);
/* Send packet */
error = sosend(so, sa, 0, m, 0, 0, td);