diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-14 19:10:02 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-14 19:10:02 -0700 |
commit | e5c8ef256ebb6e44061d7b51a212638f1ee19947 (patch) | |
tree | affaf43facf1443a84e0805d7e8c6f0221c6c5dc /src/read_config_yy.y | |
parent | c26ad47ee0bd872f65031cd5a51f6f4428714a4d (diff) | |
download | conntrack-tools-e5c8ef256ebb6e44061d7b51a212638f1ee19947.tar.gz conntrack-tools-e5c8ef256ebb6e44061d7b51a212638f1ee19947.zip |
remove generated files, apply debian patch 10-fix_udp_support.dpatch
Diffstat (limited to 'src/read_config_yy.y')
-rw-r--r-- | src/read_config_yy.y | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/read_config_yy.y b/src/read_config_yy.y index 6dfca98..5f4e6be 100644 --- a/src/read_config_yy.y +++ b/src/read_config_yy.y @@ -1221,6 +1221,25 @@ filter_protocol_item : T_TCP pent->p_proto); }; +filter_protocol_item : T_UDP +{ + struct protoent *pent; + + pent = getprotobyname("udp"); + if (pent == NULL) { + print_err(CTD_CFG_WARN, "getprotobyname() cannot find " + "protocol `udp' in /etc/protocols"); + break; + } + ct_filter_add_proto(STATE(us_filter), pent->p_proto); + + __kernel_filter_start(); + + nfct_filter_add_attr_u32(STATE(filter), + NFCT_FILTER_L4PROTO, + pent->p_proto); +}; + filter_item : T_ADDRESS T_ACCEPT '{' filter_address_list '}' { ct_filter_set_logic(STATE(us_filter), |