diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-11-06 03:22:01 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-11-06 03:22:01 +0000 |
commit | ea8216abbf38d4afcd8e1bed0e948df9111984ac (patch) | |
tree | 0012528501846214e3f50526f11ec80880c1a2b1 /extensions/libnetfilter_conntrack_icmp.c | |
parent | 9713cbc9738611d962aad548bbf61606cc1503f3 (diff) |
o move nfct_handler to libnetfilter_conntrack.c, better for encapsulation
o fixed ICMP ID handling
o fix -> libtool: link: libtool library `nfct_proto_*.la' must begin with `lib'
o remove wrong flag at extensions/Makefile.am
o bumped version to 0.0.26
o fixed versioning :(
Diffstat (limited to 'extensions/libnetfilter_conntrack_icmp.c')
-rw-r--r-- | extensions/libnetfilter_conntrack_icmp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/extensions/libnetfilter_conntrack_icmp.c b/extensions/libnetfilter_conntrack_icmp.c index 3526c4b..4e94dc1 100644 --- a/extensions/libnetfilter_conntrack_icmp.c +++ b/extensions/libnetfilter_conntrack_icmp.c @@ -38,15 +38,13 @@ static void build_tuple_proto(struct nfnlhdr *req, int size, &t->l4dst.icmp.code, sizeof(u_int8_t)); nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMP_TYPE, &t->l4dst.icmp.type, sizeof(u_int8_t)); - /* This is an ICMP echo */ - if (t->l4dst.icmp.type == 8) - nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMP_ID, - &t->l4src.icmp.id, sizeof(u_int16_t)); + nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMP_ID, + &t->l4src.icmp.id, sizeof(u_int16_t)); } static int print_proto(char *buf, struct nfct_tuple *t) { - /* The ID only makes sense for type=8 (ECHO) but we want to + /* The ID only makes sense some ICMP messages but we want to * display the same output that /proc/net/ip_conntrack does */ return (sprintf(buf, "type=%d code=%d id=%d ",t->l4dst.icmp.type, t->l4dst.icmp.code, @@ -59,7 +57,7 @@ static struct nfct_proto icmp = { .parse_proto = parse_proto, .build_tuple_proto = build_tuple_proto, .print_proto = print_proto, - .version = LIBNETFILTER_CONNTRACK_VERSION + .version = VERSION }; static void __attribute__ ((constructor)) init(void); |