• Home
  • Raw
  • Download

Lines Matching refs:entry

149 static void __mdb_entry_to_br_ip(struct br_mdb_entry *entry, struct br_ip *ip,  in __mdb_entry_to_br_ip()  argument
153 ip->vid = entry->vid; in __mdb_entry_to_br_ip()
154 ip->proto = entry->addr.proto; in __mdb_entry_to_br_ip()
157 ip->dst.ip4 = entry->addr.u.ip4; in __mdb_entry_to_br_ip()
163 ip->dst.ip6 = entry->addr.u.ip6; in __mdb_entry_to_br_ip()
169 ether_addr_copy(ip->dst.mac_addr, entry->addr.u.mac_addr); in __mdb_entry_to_br_ip()
900 static bool is_valid_mdb_entry(struct br_mdb_entry *entry, in is_valid_mdb_entry() argument
903 if (entry->ifindex == 0) { in is_valid_mdb_entry()
908 if (entry->addr.proto == htons(ETH_P_IP)) { in is_valid_mdb_entry()
909 if (!ipv4_is_multicast(entry->addr.u.ip4)) { in is_valid_mdb_entry()
913 if (ipv4_is_local_multicast(entry->addr.u.ip4)) { in is_valid_mdb_entry()
918 } else if (entry->addr.proto == htons(ETH_P_IPV6)) { in is_valid_mdb_entry()
919 if (ipv6_addr_is_ll_all_nodes(&entry->addr.u.ip6)) { in is_valid_mdb_entry()
924 } else if (entry->addr.proto == 0) { in is_valid_mdb_entry()
926 if (!is_multicast_ether_addr(entry->addr.u.mac_addr)) { in is_valid_mdb_entry()
935 if (entry->state != MDB_PERMANENT && entry->state != MDB_TEMPORARY) { in is_valid_mdb_entry()
939 if (entry->vid >= VLAN_VID_MASK) { in is_valid_mdb_entry()
996 struct br_mdb_entry *entry; in br_mdb_parse() local
1035 entry = nla_data(tb[MDBA_SET_ENTRY]); in br_mdb_parse()
1036 if (!is_valid_mdb_entry(entry, extack)) in br_mdb_parse()
1038 *pentry = entry; in br_mdb_parse()
1048 entry->addr.proto, extack)) in br_mdb_parse()
1060 const struct br_mdb_entry *entry, in __br_mdb_choose_context() argument
1071 if (!entry->vid) { in __br_mdb_choose_context()
1076 v = br_vlan_find(br_vlan_group(br), entry->vid); in __br_mdb_choose_context()
1091 struct br_mdb_entry *entry, in br_mdb_add_group() argument
1105 __mdb_entry_to_br_ip(entry, &group, mdb_attrs); in br_mdb_add_group()
1107 brmctx = __br_mdb_choose_context(br, entry, extack); in br_mdb_add_group()
1114 if (entry->state) { in br_mdb_add_group()
1124 if (br_group_is_l2(&group) && entry->state != MDB_PERMANENT) { in br_mdb_add_group()
1164 if (entry->state == MDB_PERMANENT) in br_mdb_add_group()
1174 if (entry->state == MDB_TEMPORARY) in br_mdb_add_group()
1203 struct br_mdb_entry *entry, in __br_mdb_add() argument
1210 ret = br_mdb_add_group(br, p, entry, mdb_attrs, extack); in __br_mdb_add()
1224 struct br_mdb_entry *entry; in br_mdb_add() local
1229 err = br_mdb_parse(skb, nlh, &dev, &entry, mdb_attrs, extack); in br_mdb_add()
1245 if (entry->ifindex != br->dev->ifindex) { in br_mdb_add()
1246 pdev = __dev_get_by_index(net, entry->ifindex); in br_mdb_add()
1274 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { in br_mdb_add()
1276 entry->vid = v->vid; in br_mdb_add()
1277 err = __br_mdb_add(net, br, p, entry, mdb_attrs, extack); in br_mdb_add()
1282 err = __br_mdb_add(net, br, p, entry, mdb_attrs, extack); in br_mdb_add()
1288 static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry, in __br_mdb_del() argument
1300 __mdb_entry_to_br_ip(entry, &ip, mdb_attrs); in __br_mdb_del()
1308 if (entry->ifindex == mp->br->dev->ifindex && mp->host_joined) { in __br_mdb_del()
1320 if (!p->key.port || p->key.port->dev->ifindex != entry->ifindex) in __br_mdb_del()
1344 struct br_mdb_entry *entry; in br_mdb_del() local
1349 err = br_mdb_parse(skb, nlh, &dev, &entry, mdb_attrs, extack); in br_mdb_del()
1355 if (entry->ifindex != br->dev->ifindex) { in br_mdb_del()
1356 pdev = __dev_get_by_index(net, entry->ifindex); in br_mdb_del()
1371 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { in br_mdb_del()
1373 entry->vid = v->vid; in br_mdb_del()
1374 err = __br_mdb_del(br, entry, mdb_attrs); in br_mdb_del()
1377 err = __br_mdb_del(br, entry, mdb_attrs); in br_mdb_del()