• 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()
666 static bool is_valid_mdb_entry(struct br_mdb_entry *entry, in is_valid_mdb_entry() argument
669 if (entry->ifindex == 0) { in is_valid_mdb_entry()
674 if (entry->addr.proto == htons(ETH_P_IP)) { in is_valid_mdb_entry()
675 if (!ipv4_is_multicast(entry->addr.u.ip4)) { in is_valid_mdb_entry()
679 if (ipv4_is_local_multicast(entry->addr.u.ip4)) { in is_valid_mdb_entry()
684 } else if (entry->addr.proto == htons(ETH_P_IPV6)) { in is_valid_mdb_entry()
685 if (ipv6_addr_is_ll_all_nodes(&entry->addr.u.ip6)) { in is_valid_mdb_entry()
690 } else if (entry->addr.proto == 0) { in is_valid_mdb_entry()
692 if (!is_multicast_ether_addr(entry->addr.u.mac_addr)) { in is_valid_mdb_entry()
701 if (entry->state != MDB_PERMANENT && entry->state != MDB_TEMPORARY) { in is_valid_mdb_entry()
705 if (entry->vid >= VLAN_VID_MASK) { in is_valid_mdb_entry()
762 struct br_mdb_entry *entry; in br_mdb_parse() local
801 entry = nla_data(tb[MDBA_SET_ENTRY]); in br_mdb_parse()
802 if (!is_valid_mdb_entry(entry, extack)) in br_mdb_parse()
804 *pentry = entry; in br_mdb_parse()
814 entry->addr.proto, extack)) in br_mdb_parse()
826 const struct br_mdb_entry *entry, in __br_mdb_choose_context() argument
837 if (!entry->vid) { in __br_mdb_choose_context()
842 v = br_vlan_find(br_vlan_group(br), entry->vid); in __br_mdb_choose_context()
857 struct br_mdb_entry *entry, in br_mdb_add_group() argument
871 __mdb_entry_to_br_ip(entry, &group, mdb_attrs); in br_mdb_add_group()
873 brmctx = __br_mdb_choose_context(br, entry, extack); in br_mdb_add_group()
880 if (entry->state) { in br_mdb_add_group()
890 if (br_group_is_l2(&group) && entry->state != MDB_PERMANENT) { in br_mdb_add_group()
930 if (entry->state == MDB_PERMANENT) in br_mdb_add_group()
940 if (entry->state == MDB_TEMPORARY) in br_mdb_add_group()
969 struct br_mdb_entry *entry, in __br_mdb_add() argument
976 ret = br_mdb_add_group(br, p, entry, mdb_attrs, extack); in __br_mdb_add()
990 struct br_mdb_entry *entry; in br_mdb_add() local
995 err = br_mdb_parse(skb, nlh, &dev, &entry, mdb_attrs, extack); in br_mdb_add()
1011 if (entry->ifindex != br->dev->ifindex) { in br_mdb_add()
1012 pdev = __dev_get_by_index(net, entry->ifindex); in br_mdb_add()
1028 if (p->state == BR_STATE_DISABLED && entry->state != MDB_PERMANENT) { in br_mdb_add()
1040 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { in br_mdb_add()
1042 entry->vid = v->vid; in br_mdb_add()
1043 err = __br_mdb_add(net, br, p, entry, mdb_attrs, extack); in br_mdb_add()
1048 err = __br_mdb_add(net, br, p, entry, mdb_attrs, extack); in br_mdb_add()
1054 static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry, in __br_mdb_del() argument
1066 __mdb_entry_to_br_ip(entry, &ip, mdb_attrs); in __br_mdb_del()
1074 if (entry->ifindex == mp->br->dev->ifindex && mp->host_joined) { in __br_mdb_del()
1086 if (!p->key.port || p->key.port->dev->ifindex != entry->ifindex) in __br_mdb_del()
1107 struct br_mdb_entry *entry; in br_mdb_del() local
1112 err = br_mdb_parse(skb, nlh, &dev, &entry, mdb_attrs, extack); in br_mdb_del()
1118 if (entry->ifindex != br->dev->ifindex) { in br_mdb_del()
1119 pdev = __dev_get_by_index(net, entry->ifindex); in br_mdb_del()
1140 if (br_vlan_enabled(br->dev) && vg && entry->vid == 0) { in br_mdb_del()
1142 entry->vid = v->vid; in br_mdb_del()
1143 err = __br_mdb_del(br, entry, mdb_attrs); in br_mdb_del()
1146 err = __br_mdb_del(br, entry, mdb_attrs); in br_mdb_del()