Loading include/linux/netfilter/ipset/ip_set_getport.h +10 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port); static inline bool ip_set_proto_with_ports(u8 proto) { switch (proto) { case IPPROTO_TCP: case IPPROTO_UDP: return true; } return false; } #endif /*_IP_SET_GETPORT_H*/ net/ipv4/netfilter/ip_tables.c +2 −2 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ ipt_do_table(struct sk_buff *skb, verdict = (unsigned)(-v) - 1; break; } if (*stackptr == 0) { if (*stackptr <= origptr) { e = get_entry(table_base, private->underflow[hook]); pr_debug("Underflow (this is normal) " Loading Loading @@ -427,10 +427,10 @@ ipt_do_table(struct sk_buff *skb, /* Verdict */ break; } while (!acpar.hotdrop); xt_info_rdunlock_bh(); pr_debug("Exiting %s; resetting sp from %u to %u\n", __func__, *stackptr, origptr); *stackptr = origptr; xt_info_rdunlock_bh(); #ifdef DEBUG_ALLOW_ALL return NF_ACCEPT; #else Loading net/ipv4/netfilter/ipt_CLUSTERIP.c +4 −1 Original line number Diff line number Diff line Loading @@ -664,8 +664,11 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input, char buffer[PROC_WRITELEN+1]; unsigned long nodenum; if (copy_from_user(buffer, input, PROC_WRITELEN)) if (size > PROC_WRITELEN) return -EIO; if (copy_from_user(buffer, input, size)) return -EFAULT; buffer[size] = 0; if (*buffer == '+') { nodenum = simple_strtoul(buffer+1, NULL, 10); Loading net/ipv6/netfilter/ip6_tables.c +2 −2 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ ip6t_do_table(struct sk_buff *skb, verdict = (unsigned)(-v) - 1; break; } if (*stackptr == 0) if (*stackptr <= origptr) e = get_entry(table_base, private->underflow[hook]); else Loading Loading @@ -441,8 +441,8 @@ ip6t_do_table(struct sk_buff *skb, break; } while (!acpar.hotdrop); xt_info_rdunlock_bh(); *stackptr = origptr; xt_info_rdunlock_bh(); #ifdef DEBUG_ALLOW_ALL return NF_ACCEPT; Loading net/netfilter/ipset/ip_set_core.c +17 −5 Original line number Diff line number Diff line Loading @@ -94,16 +94,28 @@ static int find_set_type_get(const char *name, u8 family, u8 revision, struct ip_set_type **found) { struct ip_set_type *type; int err; rcu_read_lock(); *found = find_set_type(name, family, revision); if (*found) { int err = !try_module_get((*found)->me); rcu_read_unlock(); return err ? -EFAULT : 0; err = !try_module_get((*found)->me) ? -EFAULT : 0; goto unlock; } /* Make sure the type is loaded but we don't support the revision */ list_for_each_entry_rcu(type, &ip_set_type_list, list) if (STREQ(type->name, name)) { err = -IPSET_ERR_FIND_TYPE; goto unlock; } rcu_read_unlock(); return try_to_load_type(name); unlock: rcu_read_unlock(); return err; } /* Find a given set type by name and family. Loading @@ -116,7 +128,7 @@ find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max) struct ip_set_type *type; bool found = false; *min = *max = 0; *min = 255; *max = 0; rcu_read_lock(); list_for_each_entry_rcu(type, &ip_set_type_list, list) if (STREQ(type->name, name) && Loading @@ -124,7 +136,7 @@ find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max) found = true; if (type->revision < *min) *min = type->revision; else if (type->revision > *max) if (type->revision > *max) *max = type->revision; } rcu_read_unlock(); Loading Loading
include/linux/netfilter/ipset/ip_set_getport.h +10 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port); static inline bool ip_set_proto_with_ports(u8 proto) { switch (proto) { case IPPROTO_TCP: case IPPROTO_UDP: return true; } return false; } #endif /*_IP_SET_GETPORT_H*/
net/ipv4/netfilter/ip_tables.c +2 −2 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ ipt_do_table(struct sk_buff *skb, verdict = (unsigned)(-v) - 1; break; } if (*stackptr == 0) { if (*stackptr <= origptr) { e = get_entry(table_base, private->underflow[hook]); pr_debug("Underflow (this is normal) " Loading Loading @@ -427,10 +427,10 @@ ipt_do_table(struct sk_buff *skb, /* Verdict */ break; } while (!acpar.hotdrop); xt_info_rdunlock_bh(); pr_debug("Exiting %s; resetting sp from %u to %u\n", __func__, *stackptr, origptr); *stackptr = origptr; xt_info_rdunlock_bh(); #ifdef DEBUG_ALLOW_ALL return NF_ACCEPT; #else Loading
net/ipv4/netfilter/ipt_CLUSTERIP.c +4 −1 Original line number Diff line number Diff line Loading @@ -664,8 +664,11 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input, char buffer[PROC_WRITELEN+1]; unsigned long nodenum; if (copy_from_user(buffer, input, PROC_WRITELEN)) if (size > PROC_WRITELEN) return -EIO; if (copy_from_user(buffer, input, size)) return -EFAULT; buffer[size] = 0; if (*buffer == '+') { nodenum = simple_strtoul(buffer+1, NULL, 10); Loading
net/ipv6/netfilter/ip6_tables.c +2 −2 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ ip6t_do_table(struct sk_buff *skb, verdict = (unsigned)(-v) - 1; break; } if (*stackptr == 0) if (*stackptr <= origptr) e = get_entry(table_base, private->underflow[hook]); else Loading Loading @@ -441,8 +441,8 @@ ip6t_do_table(struct sk_buff *skb, break; } while (!acpar.hotdrop); xt_info_rdunlock_bh(); *stackptr = origptr; xt_info_rdunlock_bh(); #ifdef DEBUG_ALLOW_ALL return NF_ACCEPT; Loading
net/netfilter/ipset/ip_set_core.c +17 −5 Original line number Diff line number Diff line Loading @@ -94,16 +94,28 @@ static int find_set_type_get(const char *name, u8 family, u8 revision, struct ip_set_type **found) { struct ip_set_type *type; int err; rcu_read_lock(); *found = find_set_type(name, family, revision); if (*found) { int err = !try_module_get((*found)->me); rcu_read_unlock(); return err ? -EFAULT : 0; err = !try_module_get((*found)->me) ? -EFAULT : 0; goto unlock; } /* Make sure the type is loaded but we don't support the revision */ list_for_each_entry_rcu(type, &ip_set_type_list, list) if (STREQ(type->name, name)) { err = -IPSET_ERR_FIND_TYPE; goto unlock; } rcu_read_unlock(); return try_to_load_type(name); unlock: rcu_read_unlock(); return err; } /* Find a given set type by name and family. Loading @@ -116,7 +128,7 @@ find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max) struct ip_set_type *type; bool found = false; *min = *max = 0; *min = 255; *max = 0; rcu_read_lock(); list_for_each_entry_rcu(type, &ip_set_type_list, list) if (STREQ(type->name, name) && Loading @@ -124,7 +136,7 @@ find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max) found = true; if (type->revision < *min) *min = type->revision; else if (type->revision > *max) if (type->revision > *max) *max = type->revision; } rcu_read_unlock(); Loading