IPtablestng/UserSpace - patch extensions
Subsystems (3)
PATCH 5/5 IPtablestng/UserSpace - patch extensions
use 'pktt_entry' instead of 'ipt_entry'.
also he creates new target named 'libipt_chain.c'. he is a helper target like 'standard' that provides the ability to use chains as target.
extensions/libipt_DNAT.c +3 -3
@@ -143,9 +143,9 @@ static int DNAT_parse(int c, char **argv, int invert, unsigned int *flags,struct ipt_natinfo *info = (void *)*target;int portok; -if (entry->ip.proto ==IPPROTO_TCP - || entry->ip.proto ==IPPROTO_UDP - || entry->ip.proto ==IPPROTO_ICMP ) +if (entry->pkt_header.ip4.proto ==IPPROTO_TCP + || entry->pkt_header.ip4.proto ==IPPROTO_UDP + || entry->pkt_header.ip4.proto ==IPPROTO_ICMP ) portok =1 ;else portok =0 ;
extensions/libipt_MASQUERADE.c +3 -3
@@ -79,9 +79,9 @@ static int MASQUERADE_parse(int c, char **argv, int invert, unsigned int *flags,struct ip_nat_multi_range *mr = (struct ip_nat_multi_range *)(*target)->data; -if (entry->ip.proto ==IPPROTO_TCP - || entry->ip.proto ==IPPROTO_UDP - || entry->ip.proto ==IPPROTO_ICMP ) +if (entry->pkt_header.ip4.proto ==IPPROTO_TCP + || entry->pkt_header.ip4.proto ==IPPROTO_UDP + || entry->pkt_header.ip4.proto ==IPPROTO_ICMP ) portok =1 ;else portok =0 ;
extensions/libipt_REDIRECT.c +3 -3
@@ -86,9 +86,9 @@ static int REDIRECT_parse(int c, char **argv, int invert, unsigned int *flags, = (struct ip_nat_multi_range *)(*target)->data;int portok; -if (entry->ip.proto ==IPPROTO_TCP - || entry->ip.proto ==IPPROTO_UDP - || entry->ip.proto ==IPPROTO_ICMP ) +if (entry->pkt_header.ip4.proto ==IPPROTO_TCP + || entry->pkt_header.ip4.proto ==IPPROTO_UDP + || entry->pkt_header.ip4.proto ==IPPROTO_ICMP ) portok =1 ;else portok =0 ;
extensions/libipt_SNAT.c +3 -3
@@ -143,9 +143,9 @@ static int SNAT_parse(int c, char **argv, int invert, unsigned int *flags,struct ipt_natinfo *info = (void *)*target;int portok; -if (entry->ip.proto ==IPPROTO_TCP - || entry->ip.proto ==IPPROTO_UDP - || entry->ip.proto ==IPPROTO_ICMP ) +if (entry->pkt_header.ip4.proto ==IPPROTO_TCP + || entry->pkt_header.ip4.proto ==IPPROTO_UDP + || entry->pkt_header.ip4.proto ==IPPROTO_ICMP ) portok =1 ;else portok =0 ;
extensions/libxt_chain.c new file +44 -0
44 lines not on this page · raw message
extensions/libxt_multiport.c +2 -2
@@ -206,7 +206,7 @@ multiport_parse(int c, char **argv, int invert, unsigned int *flags, {const struct ipt_entry *entry = e;return __multiport_parse (c, argv, invert, flags, match, - entry->ip.proto, entry->ip.invflags); + entry->pkt_header.ip4.proto, entry->pkt_header.ip4.invflags); } static int
@@ -269,7 +269,7 @@ multiport_parse_v1(int c, char **argv, int invert, unsigned int *flags, {const struct ipt_entry *entry = e;return __multiport_parse_v1 (c, argv, invert, flags, match, - entry->ip.proto, entry->ip.invflags); + entry->pkt_header.ip4.proto, entry->pkt_header.ip4.invflags); } static int