Lines Matching refs:ndm

3381 	struct ndmsg *ndm;  in nlmsg_populate_fdb_fill()  local
3383 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndm), nlflags); in nlmsg_populate_fdb_fill()
3387 ndm = nlmsg_data(nlh); in nlmsg_populate_fdb_fill()
3388 ndm->ndm_family = AF_BRIDGE; in nlmsg_populate_fdb_fill()
3389 ndm->ndm_pad1 = 0; in nlmsg_populate_fdb_fill()
3390 ndm->ndm_pad2 = 0; in nlmsg_populate_fdb_fill()
3391 ndm->ndm_flags = flags; in nlmsg_populate_fdb_fill()
3392 ndm->ndm_type = 0; in nlmsg_populate_fdb_fill()
3393 ndm->ndm_ifindex = dev->ifindex; in nlmsg_populate_fdb_fill()
3394 ndm->ndm_state = ndm_state; in nlmsg_populate_fdb_fill()
3445 int ndo_dflt_fdb_add(struct ndmsg *ndm, in ndo_dflt_fdb_add() argument
3456 if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) { in ndo_dflt_fdb_add()
3505 struct ndmsg *ndm; in rtnl_fdb_add() local
3512 err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL, extack); in rtnl_fdb_add()
3516 ndm = nlmsg_data(nlh); in rtnl_fdb_add()
3517 if (ndm->ndm_ifindex == 0) { in rtnl_fdb_add()
3522 dev = __dev_get_by_index(net, ndm->ndm_ifindex); in rtnl_fdb_add()
3542 if ((!ndm->ndm_flags || ndm->ndm_flags & NTF_MASTER) && in rtnl_fdb_add()
3547 err = ops->ndo_fdb_add(ndm, tb, dev, addr, vid, in rtnl_fdb_add()
3552 ndm->ndm_flags &= ~NTF_MASTER; in rtnl_fdb_add()
3556 if ((ndm->ndm_flags & NTF_SELF)) { in rtnl_fdb_add()
3558 err = dev->netdev_ops->ndo_fdb_add(ndm, tb, dev, addr, in rtnl_fdb_add()
3562 err = ndo_dflt_fdb_add(ndm, tb, dev, addr, vid, in rtnl_fdb_add()
3567 ndm->ndm_state); in rtnl_fdb_add()
3568 ndm->ndm_flags &= ~NTF_SELF; in rtnl_fdb_add()
3578 int ndo_dflt_fdb_del(struct ndmsg *ndm, in ndo_dflt_fdb_del() argument
3588 if (!(ndm->ndm_state & NUD_PERMANENT)) { in ndo_dflt_fdb_del()
3606 struct ndmsg *ndm; in rtnl_fdb_del() local
3616 err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL, extack); in rtnl_fdb_del()
3620 ndm = nlmsg_data(nlh); in rtnl_fdb_del()
3621 if (ndm->ndm_ifindex == 0) { in rtnl_fdb_del()
3626 dev = __dev_get_by_index(net, ndm->ndm_ifindex); in rtnl_fdb_del()
3646 if ((!ndm->ndm_flags || ndm->ndm_flags & NTF_MASTER) && in rtnl_fdb_del()
3652 err = ops->ndo_fdb_del(ndm, tb, dev, addr, vid); in rtnl_fdb_del()
3657 ndm->ndm_flags &= ~NTF_MASTER; in rtnl_fdb_del()
3661 if (ndm->ndm_flags & NTF_SELF) { in rtnl_fdb_del()
3663 err = dev->netdev_ops->ndo_fdb_del(ndm, tb, dev, addr, in rtnl_fdb_del()
3666 err = ndo_dflt_fdb_del(ndm, tb, dev, addr, vid); in rtnl_fdb_del()
3670 ndm->ndm_state); in rtnl_fdb_del()
3671 ndm->ndm_flags &= ~NTF_SELF; in rtnl_fdb_del()