/net/netfilter/ipset/ |
D | ip_set_hash_ipportnet.c | 164 hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportnet4_uadt() argument 177 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportnet4_uadt() 178 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportnet4_uadt() 179 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_ipportnet4_uadt() 180 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ipportnet4_uadt() 181 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_ipportnet4_uadt() 182 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ipportnet4_uadt() 183 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ipportnet4_uadt() 184 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ipportnet4_uadt() 185 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ipportnet4_uadt() [all …]
|
D | ip_set_hash_ipportip.c | 112 hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportip4_uadt() argument 123 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportip4_uadt() 124 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportip4_uadt() 125 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_ipportip4_uadt() 126 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ipportip4_uadt() 127 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ipportip4_uadt() 128 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ipportip4_uadt() 129 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ipportip4_uadt() 130 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ipportip4_uadt() 131 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_ipportip4_uadt() [all …]
|
D | ip_set_hash_ipport.c | 110 hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipport4_uadt() argument 121 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipport4_uadt() 122 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipport4_uadt() 123 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_ipport4_uadt() 124 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ipport4_uadt() 125 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ipport4_uadt() 126 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ipport4_uadt() 127 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ipport4_uadt() 128 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ipport4_uadt() 129 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_ipport4_uadt() [all …]
|
D | ip_set_hash_netportnet.c | 173 hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netportnet4_uadt() argument 187 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netportnet4_uadt() 188 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netportnet4_uadt() 189 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netportnet4_uadt() 190 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_netportnet4_uadt() 191 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_netportnet4_uadt() 192 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_netportnet4_uadt() 193 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_netportnet4_uadt() 194 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_netportnet4_uadt() 195 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_netportnet4_uadt() [all …]
|
D | ip_set_hash_ipmark.c | 103 hash_ipmark4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipmark4_uadt() argument 113 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipmark4_uadt() 114 !ip_set_attr_netorder(tb, IPSET_ATTR_MARK) || in hash_ipmark4_uadt() 115 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ipmark4_uadt() 116 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ipmark4_uadt() 117 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ipmark4_uadt() 118 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ipmark4_uadt() 119 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ipmark4_uadt() 120 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_ipmark4_uadt() 123 if (tb[IPSET_ATTR_LINENO]) in hash_ipmark4_uadt() [all …]
|
D | ip_set_hash_netport.c | 158 hash_netport4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netport4_uadt() argument 170 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_netport4_uadt() 171 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_netport4_uadt() 172 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in hash_netport4_uadt() 173 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_netport4_uadt() 174 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_netport4_uadt() 175 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_netport4_uadt() 176 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_netport4_uadt() 177 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_netport4_uadt() 178 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_netport4_uadt() [all …]
|
D | ip_set_hash_netnet.c | 158 hash_netnet4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netnet4_uadt() argument 171 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_netnet4_uadt() 172 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_netnet4_uadt() 173 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_netnet4_uadt() 174 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_netnet4_uadt() 175 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_netnet4_uadt() 176 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_netnet4_uadt() 177 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_netnet4_uadt() 178 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_netnet4_uadt() 181 if (tb[IPSET_ATTR_LINENO]) in hash_netnet4_uadt() [all …]
|
D | ip_set_hash_net.c | 140 hash_net4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_net4_uadt() argument 150 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_net4_uadt() 151 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_net4_uadt() 152 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_net4_uadt() 153 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_net4_uadt() 154 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_net4_uadt() 155 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_net4_uadt() 156 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_net4_uadt() 157 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_net4_uadt() 160 if (tb[IPSET_ATTR_LINENO]) in hash_net4_uadt() [all …]
|
D | ip_set_hash_ip.c | 102 hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ip4_uadt() argument 112 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ip4_uadt() 113 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_ip4_uadt() 114 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_ip4_uadt() 115 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_ip4_uadt() 116 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_ip4_uadt() 117 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_ip4_uadt() 118 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_ip4_uadt() 121 if (tb[IPSET_ATTR_LINENO]) in hash_ip4_uadt() 122 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ip4_uadt() [all …]
|
D | ip_set_bitmap_ip.c | 130 bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[], in bitmap_ip_uadt() argument 140 if (unlikely(!tb[IPSET_ATTR_IP] || in bitmap_ip_uadt() 141 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in bitmap_ip_uadt() 142 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in bitmap_ip_uadt() 143 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in bitmap_ip_uadt() 144 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in bitmap_ip_uadt() 145 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in bitmap_ip_uadt() 146 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in bitmap_ip_uadt() 149 if (tb[IPSET_ATTR_LINENO]) in bitmap_ip_uadt() 150 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in bitmap_ip_uadt() [all …]
|
D | ip_set_hash_netiface.c | 269 hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_netiface4_uadt() argument 280 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_netiface4_uadt() 281 !tb[IPSET_ATTR_IFACE] || in hash_netiface4_uadt() 282 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_netiface4_uadt() 283 !ip_set_optattr_netorder(tb, IPSET_ATTR_CADT_FLAGS) || in hash_netiface4_uadt() 284 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_netiface4_uadt() 285 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_netiface4_uadt() 286 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_netiface4_uadt() 287 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_netiface4_uadt() 288 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_netiface4_uadt() [all …]
|
D | ip_set_bitmap_port.c | 128 bitmap_port_uadt(struct ip_set *set, struct nlattr *tb[], in bitmap_port_uadt() argument 139 if (unlikely(!ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in bitmap_port_uadt() 140 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO) || in bitmap_port_uadt() 141 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in bitmap_port_uadt() 142 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in bitmap_port_uadt() 143 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in bitmap_port_uadt() 144 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in bitmap_port_uadt() 145 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in bitmap_port_uadt() 146 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in bitmap_port_uadt() 149 if (tb[IPSET_ATTR_LINENO]) in bitmap_port_uadt() [all …]
|
D | ip_set_bitmap_ipmac.c | 231 bitmap_ipmac_uadt(struct ip_set *set, struct nlattr *tb[], in bitmap_ipmac_uadt() argument 241 if (unlikely(!tb[IPSET_ATTR_IP] || in bitmap_ipmac_uadt() 242 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in bitmap_ipmac_uadt() 243 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in bitmap_ipmac_uadt() 244 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in bitmap_ipmac_uadt() 245 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in bitmap_ipmac_uadt() 246 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in bitmap_ipmac_uadt() 247 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in bitmap_ipmac_uadt() 250 if (tb[IPSET_ATTR_LINENO]) in bitmap_ipmac_uadt() 251 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in bitmap_ipmac_uadt() [all …]
|
D | ip_set_hash_mac.c | 98 hash_mac4_uadt(struct ip_set *set, struct nlattr *tb[], in hash_mac4_uadt() argument 106 if (unlikely(!tb[IPSET_ATTR_ETHER] || in hash_mac4_uadt() 107 !ip_set_optattr_netorder(tb, IPSET_ATTR_TIMEOUT) || in hash_mac4_uadt() 108 !ip_set_optattr_netorder(tb, IPSET_ATTR_PACKETS) || in hash_mac4_uadt() 109 !ip_set_optattr_netorder(tb, IPSET_ATTR_BYTES) || in hash_mac4_uadt() 110 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBMARK) || in hash_mac4_uadt() 111 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBPRIO) || in hash_mac4_uadt() 112 !ip_set_optattr_netorder(tb, IPSET_ATTR_SKBQUEUE))) in hash_mac4_uadt() 115 if (tb[IPSET_ATTR_LINENO]) in hash_mac4_uadt() 116 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_mac4_uadt() [all …]
|
/net/netfilter/ |
D | nfnetlink_cthelper.c | 79 struct nlattr *tb[NFCTH_TUPLE_MAX+1]; in nfnl_cthelper_parse_tuple() local 81 err = nla_parse_nested(tb, NFCTH_TUPLE_MAX, attr, nfnl_cthelper_tuple_pol); in nfnl_cthelper_parse_tuple() 85 if (!tb[NFCTH_TUPLE_L3PROTONUM] || !tb[NFCTH_TUPLE_L4PROTONUM]) in nfnl_cthelper_parse_tuple() 91 tuple->src.l3num = ntohs(nla_get_be16(tb[NFCTH_TUPLE_L3PROTONUM])); in nfnl_cthelper_parse_tuple() 92 tuple->dst.protonum = nla_get_u8(tb[NFCTH_TUPLE_L4PROTONUM]); in nfnl_cthelper_parse_tuple() 139 struct nlattr *tb[NFCTH_POLICY_MAX+1]; in nfnl_cthelper_expect_policy() local 141 err = nla_parse_nested(tb, NFCTH_POLICY_MAX, attr, nfnl_cthelper_expect_pol); in nfnl_cthelper_expect_policy() 145 if (!tb[NFCTH_POLICY_NAME] || in nfnl_cthelper_expect_policy() 146 !tb[NFCTH_POLICY_EXPECT_MAX] || in nfnl_cthelper_expect_policy() 147 !tb[NFCTH_POLICY_EXPECT_TIMEOUT]) in nfnl_cthelper_expect_policy() [all …]
|
D | nft_nat.c | 92 const struct nlattr * const tb[]) in nft_nat_init() argument 102 if (tb[NFTA_NAT_TYPE] == NULL || in nft_nat_init() 103 (tb[NFTA_NAT_REG_ADDR_MIN] == NULL && in nft_nat_init() 104 tb[NFTA_NAT_REG_PROTO_MIN] == NULL)) in nft_nat_init() 107 switch (ntohl(nla_get_be32(tb[NFTA_NAT_TYPE]))) { in nft_nat_init() 118 if (tb[NFTA_NAT_FAMILY] == NULL) in nft_nat_init() 121 family = ntohl(nla_get_be32(tb[NFTA_NAT_FAMILY])); in nft_nat_init() 128 if (tb[NFTA_NAT_REG_ADDR_MIN]) { in nft_nat_init() 130 ntohl(nla_get_be32(tb[NFTA_NAT_REG_ADDR_MIN])); in nft_nat_init() 136 if (tb[NFTA_NAT_REG_ADDR_MAX]) { in nft_nat_init() [all …]
|
D | nft_payload.c | 62 const struct nlattr * const tb[]) in nft_payload_init() argument 67 priv->base = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_BASE])); in nft_payload_init() 68 priv->offset = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_OFFSET])); in nft_payload_init() 69 priv->len = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_LEN])); in nft_payload_init() 71 priv->dreg = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_DREG])); in nft_payload_init() 112 const struct nlattr * const tb[]) in nft_payload_select_ops() argument 117 if (tb[NFTA_PAYLOAD_DREG] == NULL || in nft_payload_select_ops() 118 tb[NFTA_PAYLOAD_BASE] == NULL || in nft_payload_select_ops() 119 tb[NFTA_PAYLOAD_OFFSET] == NULL || in nft_payload_select_ops() 120 tb[NFTA_PAYLOAD_LEN] == NULL) in nft_payload_select_ops() [all …]
|
D | nft_cmp.c | 72 const struct nlattr * const tb[]) in nft_cmp_init() argument 78 priv->sreg = ntohl(nla_get_be32(tb[NFTA_CMP_SREG])); in nft_cmp_init() 79 priv->op = ntohl(nla_get_be32(tb[NFTA_CMP_OP])); in nft_cmp_init() 81 err = nft_data_init(NULL, &priv->data, &desc, tb[NFTA_CMP_DATA]); in nft_cmp_init() 117 const struct nlattr * const tb[]) in nft_cmp_fast_init() argument 125 priv->sreg = ntohl(nla_get_be32(tb[NFTA_CMP_SREG])); in nft_cmp_fast_init() 127 err = nft_data_init(NULL, &data, &desc, tb[NFTA_CMP_DATA]); in nft_cmp_fast_init() 166 nft_cmp_select_ops(const struct nft_ctx *ctx, const struct nlattr * const tb[]) in nft_cmp_select_ops() argument 174 if (tb[NFTA_CMP_SREG] == NULL || in nft_cmp_select_ops() 175 tb[NFTA_CMP_OP] == NULL || in nft_cmp_select_ops() [all …]
|
D | nfnetlink_acct.c | 53 const struct nlmsghdr *nlh, const struct nlattr * const tb[]) in nfnl_acct_new() argument 60 if (!tb[NFACCT_NAME]) in nfnl_acct_new() 63 acct_name = nla_data(tb[NFACCT_NAME]); in nfnl_acct_new() 93 if (tb[NFACCT_FLAGS]) { in nfnl_acct_new() 94 flags = ntohl(nla_get_be32(tb[NFACCT_FLAGS])); in nfnl_acct_new() 112 *quota = be64_to_cpu(nla_get_be64(tb[NFACCT_QUOTA])); in nfnl_acct_new() 116 strncpy(nfacct->name, nla_data(tb[NFACCT_NAME]), NFACCT_NAME_MAX); in nfnl_acct_new() 118 if (tb[NFACCT_BYTES]) { in nfnl_acct_new() 120 be64_to_cpu(nla_get_be64(tb[NFACCT_BYTES]))); in nfnl_acct_new() 122 if (tb[NFACCT_PKTS]) { in nfnl_acct_new() [all …]
|
/net/ipv4/ |
D | inet_hashtables.c | 61 struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); in inet_bind_bucket_create() local 63 if (tb != NULL) { in inet_bind_bucket_create() 64 write_pnet(&tb->ib_net, hold_net(net)); in inet_bind_bucket_create() 65 tb->port = snum; in inet_bind_bucket_create() 66 tb->fastreuse = 0; in inet_bind_bucket_create() 67 tb->fastreuseport = 0; in inet_bind_bucket_create() 68 tb->num_owners = 0; in inet_bind_bucket_create() 69 INIT_HLIST_HEAD(&tb->owners); in inet_bind_bucket_create() 70 hlist_add_head(&tb->node, &head->chain); in inet_bind_bucket_create() 72 return tb; in inet_bind_bucket_create() [all …]
|
D | fib_frontend.c | 77 struct fib_table *tb; in fib_new_table() local 82 tb = fib_get_table(net, id); in fib_new_table() 83 if (tb) in fib_new_table() 84 return tb; in fib_new_table() 86 tb = fib_trie_table(id); in fib_new_table() 87 if (!tb) in fib_new_table() 92 net->ipv4.fib_local = tb; in fib_new_table() 96 net->ipv4.fib_main = tb; in fib_new_table() 100 net->ipv4.fib_default = tb; in fib_new_table() 108 hlist_add_head_rcu(&tb->tb_hlist, &net->ipv4.fib_table_hash[h]); in fib_new_table() [all …]
|
/net/core/ |
D | rtnetlink.c | 1251 struct nlattr *tb[IFLA_MAX+1]; in rtnl_dump_ifinfo() local 1271 if (nlmsg_parse(cb->nlh, hdrlen, tb, IFLA_MAX, ifla_policy) >= 0) { in rtnl_dump_ifinfo() 1273 if (tb[IFLA_EXT_MASK]) in rtnl_dump_ifinfo() 1274 ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]); in rtnl_dump_ifinfo() 1308 int rtnl_nla_parse_ifla(struct nlattr **tb, const struct nlattr *head, int len) in rtnl_nla_parse_ifla() argument 1310 return nla_parse(tb, IFLA_MAX, head, len, ifla_policy); in rtnl_nla_parse_ifla() 1314 struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]) in rtnl_link_get_net() argument 1320 if (tb[IFLA_NET_NS_PID]) in rtnl_link_get_net() 1321 net = get_net_ns_by_pid(nla_get_u32(tb[IFLA_NET_NS_PID])); in rtnl_link_get_net() 1322 else if (tb[IFLA_NET_NS_FD]) in rtnl_link_get_net() [all …]
|
D | fib_rules.c | 196 static struct fib_kuid_range nla_get_kuid_range(struct nlattr **tb) in nla_get_kuid_range() argument 201 in = (struct fib_rule_uid_range *)nla_data(tb[FRA_UID_RANGE]); in nla_get_kuid_range() 291 static int validate_rulemsg(struct fib_rule_hdr *frh, struct nlattr **tb, in validate_rulemsg() argument 297 if (tb[FRA_SRC] == NULL || in validate_rulemsg() 299 nla_len(tb[FRA_SRC]) != ops->addr_size) in validate_rulemsg() 303 if (tb[FRA_DST] == NULL || in validate_rulemsg() 305 nla_len(tb[FRA_DST]) != ops->addr_size) in validate_rulemsg() 319 struct nlattr *tb[FRA_MAX+1]; in fib_nl_newrule() local 331 err = nlmsg_parse(nlh, sizeof(*frh), tb, FRA_MAX, ops->policy); in fib_nl_newrule() 335 err = validate_rulemsg(frh, tb, ops); in fib_nl_newrule() [all …]
|
/net/bridge/ |
D | br_netlink.c | 232 struct nlattr *tb[IFLA_BRIDGE_MAX+1]; in br_afspec() local 235 err = nla_parse_nested(tb, IFLA_BRIDGE_MAX, af_spec, ifla_br_policy); in br_afspec() 239 if (tb[IFLA_BRIDGE_VLAN_INFO]) { in br_afspec() 242 vinfo = nla_data(tb[IFLA_BRIDGE_VLAN_INFO]); in br_afspec() 312 static void br_set_port_flag(struct net_bridge_port *p, struct nlattr *tb[], in br_set_port_flag() argument 315 if (tb[attrtype]) { in br_set_port_flag() 316 u8 flag = nla_get_u8(tb[attrtype]); in br_set_port_flag() 325 static int br_setport(struct net_bridge_port *p, struct nlattr *tb[]) in br_setport() argument 330 br_set_port_flag(p, tb, IFLA_BRPORT_MODE, BR_HAIRPIN_MODE); in br_setport() 331 br_set_port_flag(p, tb, IFLA_BRPORT_GUARD, BR_BPDU_GUARD); in br_setport() [all …]
|
/net/bridge/netfilter/ |
D | nft_meta_bridge.c | 53 const struct nlattr * const tb[]) in nft_meta_bridge_get_init() argument 58 priv->key = ntohl(nla_get_be32(tb[NFTA_META_KEY])); in nft_meta_bridge_get_init() 64 return nft_meta_get_init(ctx, expr, tb); in nft_meta_bridge_get_init() 67 priv->dreg = ntohl(nla_get_be32(tb[NFTA_META_DREG])); in nft_meta_bridge_get_init() 98 const struct nlattr * const tb[]) in nft_meta_bridge_select_ops() argument 100 if (tb[NFTA_META_KEY] == NULL) in nft_meta_bridge_select_ops() 103 if (tb[NFTA_META_DREG] && tb[NFTA_META_SREG]) in nft_meta_bridge_select_ops() 106 if (tb[NFTA_META_DREG]) in nft_meta_bridge_select_ops() 109 if (tb[NFTA_META_SREG]) in nft_meta_bridge_select_ops()
|