diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-13 05:10:16 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2006-12-13 05:10:16 +0000 |
commit | a47cbe32d5a8bf07aca6d6d9c94c040d1658f15b (patch) | |
tree | 863c4ee84dfd5bb638d4f81029e1042157ffe841 /sbin/pfctl/pfctl_osfp.c | |
parent | 676cabb26db08770818f948b13e3965cf7e3e3f7 (diff) |
IPv6 passive OS fingerprinting.
reuses IPv4 signature file (assuming that TCP code is shared among IPv4/v6).
mcbride ok.
Diffstat (limited to 'sbin/pfctl/pfctl_osfp.c')
-rw-r--r-- | sbin/pfctl/pfctl_osfp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_osfp.c b/sbin/pfctl/pfctl_osfp.c index 0fe5a1426e5..7018d6cd365 100644 --- a/sbin/pfctl/pfctl_osfp.c +++ b/sbin/pfctl/pfctl_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_osfp.c,v 1.14 2006/04/08 02:13:14 ray Exp $ */ +/* $OpenBSD: pfctl_osfp.c,v 1.15 2006/12/13 05:10:15 itojun Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@openbsd.org> @@ -23,6 +23,10 @@ #include <net/if.h> #include <net/pfvar.h> +#include <netinet/in_systm.h> +#include <netinet/ip.h> +#include <netinet/ip6.h> + #include <ctype.h> #include <err.h> #include <errno.h> @@ -240,6 +244,10 @@ pfctl_file_fingerprints(int dev, int opts, const char *fp_filename) sizeof(fp.fp_os.fp_subtype_nm)); add_fingerprint(dev, opts, &fp); + + fp.fp_flags |= (PF_OSFP_DF | PF_OSFP_INET6); + fp.fp_psize += sizeof(struct ip6_hdr) - sizeof(struct ip); + add_fingerprint(dev, opts, &fp); } if (class) |