Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142992305
D8109.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8109.diff
View Options
Index: sys/netpfil/ipfw/ip_fw_pfil.c
===================================================================
--- sys/netpfil/ipfw/ip_fw_pfil.c
+++ sys/netpfil/ipfw/ip_fw_pfil.c
@@ -180,12 +180,11 @@
len = sizeof(struct sockaddr_in);
#endif
- /* Incoming packets should not be tagged so we do not
- * m_tag_find. Outgoing packets may be tagged, so we
- * reuse the tag if present.
+ /*
+ * Reuse the tag if present. We can overwrite
+ * a previous pfil hook decision this way.
*/
- fwd_tag = (dir == DIR_IN) ? NULL :
- m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL);
+ fwd_tag = m_tag_find(*m0, PACKET_TAG_IPFORWARD, NULL);
if (fwd_tag != NULL) {
m_tag_unlink(*m0, fwd_tag);
} else {
@@ -213,6 +212,8 @@
}
if (in6_localip(&sa6->sin6_addr))
(*m0)->m_flags |= M_FASTFWD_OURS;
+ else
+ (*m0)->m_flags &= ~M_FASTFWD_OURS;
(*m0)->m_flags |= M_IP6_NEXTHOP;
}
#endif
@@ -221,6 +222,8 @@
bcopy(args.next_hop, (fwd_tag+1), len);
if (in_localip(args.next_hop->sin_addr))
(*m0)->m_flags |= M_FASTFWD_OURS;
+ else
+ (*m0)->m_flags &= ~M_FASTFWD_OURS;
(*m0)->m_flags |= M_IP_NEXTHOP;
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 26, 3:30 AM (20 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27997029
Default Alt Text
D8109.diff (1 KB)
Attached To
Mode
D8109: ipfw: prepare ipfw for cooperation inside the pfil hook
Attached
Detach File
Event Timeline
Log In to Comment