rtnetlink.c (f0718d792b8a6d4b5ddc929e418ac57cc4897375) rtnetlink.c (da71577545a52be3e0e9225a946e5fd79cfab015)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 3586 unchanged lines hidden (view full) ---

3595 return -ENODEV;
3596 }
3597
3598 if (!tb[NDA_LLADDR] || nla_len(tb[NDA_LLADDR]) != ETH_ALEN) {
3599 NL_SET_ERR_MSG(extack, "invalid address");
3600 return -EINVAL;
3601 }
3602
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 3586 unchanged lines hidden (view full) ---

3595 return -ENODEV;
3596 }
3597
3598 if (!tb[NDA_LLADDR] || nla_len(tb[NDA_LLADDR]) != ETH_ALEN) {
3599 NL_SET_ERR_MSG(extack, "invalid address");
3600 return -EINVAL;
3601 }
3602
3603 if (dev->type != ARPHRD_ETHER) {
3604 NL_SET_ERR_MSG(extack, "FDB add only supported for Ethernet devices");
3605 return -EINVAL;
3606 }
3607
3603 addr = nla_data(tb[NDA_LLADDR]);
3604
3605 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
3606 if (err)
3607 return err;
3608
3609 err = -EOPNOTSUPP;
3610

--- 88 unchanged lines hidden (view full) ---

3699 return -ENODEV;
3700 }
3701
3702 if (!tb[NDA_LLADDR] || nla_len(tb[NDA_LLADDR]) != ETH_ALEN) {
3703 NL_SET_ERR_MSG(extack, "invalid address");
3704 return -EINVAL;
3705 }
3706
3608 addr = nla_data(tb[NDA_LLADDR]);
3609
3610 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
3611 if (err)
3612 return err;
3613
3614 err = -EOPNOTSUPP;
3615

--- 88 unchanged lines hidden (view full) ---

3704 return -ENODEV;
3705 }
3706
3707 if (!tb[NDA_LLADDR] || nla_len(tb[NDA_LLADDR]) != ETH_ALEN) {
3708 NL_SET_ERR_MSG(extack, "invalid address");
3709 return -EINVAL;
3710 }
3711
3712 if (dev->type != ARPHRD_ETHER) {
3713 NL_SET_ERR_MSG(extack, "FDB delete only supported for Ethernet devices");
3714 return -EINVAL;
3715 }
3716
3707 addr = nla_data(tb[NDA_LLADDR]);
3708
3709 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
3710 if (err)
3711 return err;
3712
3713 err = -EOPNOTSUPP;
3714

--- 1344 unchanged lines hidden ---
3717 addr = nla_data(tb[NDA_LLADDR]);
3718
3719 err = fdb_vid_parse(tb[NDA_VLAN], &vid, extack);
3720 if (err)
3721 return err;
3722
3723 err = -EOPNOTSUPP;
3724

--- 1344 unchanged lines hidden ---