summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/filter.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-04-24 02:13:34 +0000
committerbrian <brian@FreeBSD.org>2001-04-24 02:13:34 +0000
commitd487445d059fdf0ea10570641cfa7d3fa4430e70 (patch)
treea7caabe22126e4d14d20ad1127f2ee3afc407973 /usr.sbin/ppp/filter.c
parent9c03a8ae91e06e47f0c59996ef0e2300e231e101 (diff)
downloadFreeBSD-src-d487445d059fdf0ea10570641cfa7d3fa4430e70.zip
FreeBSD-src-d487445d059fdf0ea10570641cfa7d3fa4430e70.tar.gz
Handle IP over IP (IPPROTO_IPV4) properly.
We now unwrap IP/IP and apply filter rules to both the outer layer (with ``set filter blah x.x.x.x y.y.y.y ipip'') and to the payload (reinterpreted by the filter rules). ``set log tcp/ip'' will now show both the outer wrapper and the (reinterpreted) payload contents.
Diffstat (limited to 'usr.sbin/ppp/filter.c')
-rw-r--r--usr.sbin/ppp/filter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index 99c36ee..bee1021 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -153,6 +153,9 @@ ParsePort(const char *service, int proto)
int port;
switch (proto) {
+ case P_IPIP:
+ protocol_name = "ipip";
+ break;
case P_UDP:
protocol_name = "udp";
break;
@@ -483,6 +486,9 @@ Parse(struct ipcp *ipcp, int argc, char const *const *argv,
case P_UDP:
val = ParseUdpOrTcp(argc, argv, P_UDP, &filterdata);
break;
+ case P_IPIP:
+ val = ParseUdpOrTcp(argc, argv, P_IPIP, &filterdata);
+ break;
case P_ICMP:
val = ParseIcmp(argc, argv, &filterdata);
break;
@@ -641,7 +647,7 @@ filter_Show(struct cmdargs const *arg)
}
static const char * const protoname[] = {
- "none", "tcp", "udp", "icmp", "ospf", "igmp", "gre"
+ "none", "tcp", "udp", "icmp", "ospf", "igmp", "gre", "ipip"
};
const char *
OpenPOWER on IntegriCloud