linux/net/core/rtnetlink.c
<<
>>
Prefs
   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>
   9 *
  10 *              This program is free software; you can redistribute it and/or
  11 *              modify it under the terms of the GNU General Public License
  12 *              as published by the Free Software Foundation; either version
  13 *              2 of the License, or (at your option) any later version.
  14 *
  15 *      Fixes:
  16 *      Vitaly E. Lavrov                RTA_OK arithmetics was wrong.
  17 */
  18
  19#include <linux/errno.h>
  20#include <linux/module.h>
  21#include <linux/types.h>
  22#include <linux/socket.h>
  23#include <linux/kernel.h>
  24#include <linux/timer.h>
  25#include <linux/string.h>
  26#include <linux/sockios.h>
  27#include <linux/net.h>
  28#include <linux/fcntl.h>
  29#include <linux/mm.h>
  30#include <linux/slab.h>
  31#include <linux/interrupt.h>
  32#include <linux/capability.h>
  33#include <linux/skbuff.h>
  34#include <linux/init.h>
  35#include <linux/security.h>
  36#include <linux/mutex.h>
  37#include <linux/if_addr.h>
  38#include <linux/if_bridge.h>
  39#include <linux/pci.h>
  40#include <linux/etherdevice.h>
  41
  42#include <asm/uaccess.h>
  43
  44#include <linux/inet.h>
  45#include <linux/netdevice.h>
  46#include <net/ip.h>
  47#include <net/protocol.h>
  48#include <net/arp.h>
  49#include <net/route.h>
  50#include <net/udp.h>
  51#include <net/sock.h>
  52#include <net/pkt_sched.h>
  53#include <net/fib_rules.h>
  54#include <net/rtnetlink.h>
  55#include <net/net_namespace.h>
  56
  57struct rtnl_link {
  58        rtnl_doit_func          doit;
  59        rtnl_dumpit_func        dumpit;
  60        rtnl_calcit_func        calcit;
  61};
  62
  63static DEFINE_MUTEX(rtnl_mutex);
  64
  65void rtnl_lock(void)
  66{
  67        mutex_lock(&rtnl_mutex);
  68}
  69EXPORT_SYMBOL(rtnl_lock);
  70
  71void __rtnl_unlock(void)
  72{
  73        mutex_unlock(&rtnl_mutex);
  74}
  75
  76void rtnl_unlock(void)
  77{
  78        /* This fellow will unlock it for us. */
  79        netdev_run_todo();
  80}
  81EXPORT_SYMBOL(rtnl_unlock);
  82
  83int rtnl_trylock(void)
  84{
  85        return mutex_trylock(&rtnl_mutex);
  86}
  87EXPORT_SYMBOL(rtnl_trylock);
  88
  89int rtnl_is_locked(void)
  90{
  91        return mutex_is_locked(&rtnl_mutex);
  92}
  93EXPORT_SYMBOL(rtnl_is_locked);
  94
  95#ifdef CONFIG_PROVE_LOCKING
  96int lockdep_rtnl_is_held(void)
  97{
  98        return lockdep_is_held(&rtnl_mutex);
  99}
 100EXPORT_SYMBOL(lockdep_rtnl_is_held);
 101#endif /* #ifdef CONFIG_PROVE_LOCKING */
 102
 103static struct rtnl_link *rtnl_msg_handlers[RTNL_FAMILY_MAX + 1];
 104
 105static inline int rtm_msgindex(int msgtype)
 106{
 107        int msgindex = msgtype - RTM_BASE;
 108
 109        /*
 110         * msgindex < 0 implies someone tried to register a netlink
 111         * control code. msgindex >= RTM_NR_MSGTYPES may indicate that
 112         * the message type has not been added to linux/rtnetlink.h
 113         */
 114        BUG_ON(msgindex < 0 || msgindex >= RTM_NR_MSGTYPES);
 115
 116        return msgindex;
 117}
 118
 119static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex)
 120{
 121        struct rtnl_link *tab;
 122
 123        if (protocol <= RTNL_FAMILY_MAX)
 124                tab = rtnl_msg_handlers[protocol];
 125        else
 126                tab = NULL;
 127
 128        if (tab == NULL || tab[msgindex].doit == NULL)
 129                tab = rtnl_msg_handlers[PF_UNSPEC];
 130
 131        return tab ? tab[msgindex].doit : NULL;
 132}
 133
 134static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
 135{
 136        struct rtnl_link *tab;
 137
 138        if (protocol <= RTNL_FAMILY_MAX)
 139                tab = rtnl_msg_handlers[protocol];
 140        else
 141                tab = NULL;
 142
 143        if (tab == NULL || tab[msgindex].dumpit == NULL)
 144                tab = rtnl_msg_handlers[PF_UNSPEC];
 145
 146        return tab ? tab[msgindex].dumpit : NULL;
 147}
 148
 149static rtnl_calcit_func rtnl_get_calcit(int protocol, int msgindex)
 150{
 151        struct rtnl_link *tab;
 152
 153        if (protocol <= RTNL_FAMILY_MAX)
 154                tab = rtnl_msg_handlers[protocol];
 155        else
 156                tab = NULL;
 157
 158        if (tab == NULL || tab[msgindex].calcit == NULL)
 159                tab = rtnl_msg_handlers[PF_UNSPEC];
 160
 161        return tab ? tab[msgindex].calcit : NULL;
 162}
 163
 164/**
 165 * __rtnl_register - Register a rtnetlink message type
 166 * @protocol: Protocol family or PF_UNSPEC
 167 * @msgtype: rtnetlink message type
 168 * @doit: Function pointer called for each request message
 169 * @dumpit: Function pointer called for each dump request (NLM_F_DUMP) message
 170 * @calcit: Function pointer to calc size of dump message
 171 *
 172 * Registers the specified function pointers (at least one of them has
 173 * to be non-NULL) to be called whenever a request message for the
 174 * specified protocol family and message type is received.
 175 *
 176 * The special protocol family PF_UNSPEC may be used to define fallback
 177 * function pointers for the case when no entry for the specific protocol
 178 * family exists.
 179 *
 180 * Returns 0 on success or a negative error code.
 181 */
 182int __rtnl_register(int protocol, int msgtype,
 183                    rtnl_doit_func doit, rtnl_dumpit_func dumpit,
 184                    rtnl_calcit_func calcit)
 185{
 186        struct rtnl_link *tab;
 187        int msgindex;
 188
 189        BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX);
 190        msgindex = rtm_msgindex(msgtype);
 191
 192        tab = rtnl_msg_handlers[protocol];
 193        if (tab == NULL) {
 194                tab = kcalloc(RTM_NR_MSGTYPES, sizeof(*tab), GFP_KERNEL);
 195                if (tab == NULL)
 196                        return -ENOBUFS;
 197
 198                rtnl_msg_handlers[protocol] = tab;
 199        }
 200
 201        if (doit)
 202                tab[msgindex].doit = doit;
 203
 204        if (dumpit)
 205                tab[msgindex].dumpit = dumpit;
 206
 207        if (calcit)
 208                tab[msgindex].calcit = calcit;
 209
 210        return 0;
 211}
 212EXPORT_SYMBOL_GPL(__rtnl_register);
 213
 214/**
 215 * rtnl_register - Register a rtnetlink message type
 216 *
 217 * Identical to __rtnl_register() but panics on failure. This is useful
 218 * as failure of this function is very unlikely, it can only happen due
 219 * to lack of memory when allocating the chain to store all message
 220 * handlers for a protocol. Meant for use in init functions where lack
 221 * of memory implies no sense in continuing.
 222 */
 223void rtnl_register(int protocol, int msgtype,
 224                   rtnl_doit_func doit, rtnl_dumpit_func dumpit,
 225                   rtnl_calcit_func calcit)
 226{
 227        if (__rtnl_register(protocol, msgtype, doit, dumpit, calcit) < 0)
 228                panic("Unable to register rtnetlink message handler, "
 229                      "protocol = %d, message type = %d\n",
 230                      protocol, msgtype);
 231}
 232EXPORT_SYMBOL_GPL(rtnl_register);
 233
 234/**
 235 * rtnl_unregister - Unregister a rtnetlink message type
 236 * @protocol: Protocol family or PF_UNSPEC
 237 * @msgtype: rtnetlink message type
 238 *
 239 * Returns 0 on success or a negative error code.
 240 */
 241int rtnl_unregister(int protocol, int msgtype)
 242{
 243        int msgindex;
 244
 245        BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX);
 246        msgindex = rtm_msgindex(msgtype);
 247
 248        if (rtnl_msg_handlers[protocol] == NULL)
 249                return -ENOENT;
 250
 251        rtnl_msg_handlers[protocol][msgindex].doit = NULL;
 252        rtnl_msg_handlers[protocol][msgindex].dumpit = NULL;
 253
 254        return 0;
 255}
 256EXPORT_SYMBOL_GPL(rtnl_unregister);
 257
 258/**
 259 * rtnl_unregister_all - Unregister all rtnetlink message type of a protocol
 260 * @protocol : Protocol family or PF_UNSPEC
 261 *
 262 * Identical to calling rtnl_unregster() for all registered message types
 263 * of a certain protocol family.
 264 */
 265void rtnl_unregister_all(int protocol)
 266{
 267        BUG_ON(protocol < 0 || protocol > RTNL_FAMILY_MAX);
 268
 269        kfree(rtnl_msg_handlers[protocol]);
 270        rtnl_msg_handlers[protocol] = NULL;
 271}
 272EXPORT_SYMBOL_GPL(rtnl_unregister_all);
 273
 274static LIST_HEAD(link_ops);
 275
 276static const struct rtnl_link_ops *rtnl_link_ops_get(const char *kind)
 277{
 278        const struct rtnl_link_ops *ops;
 279
 280        list_for_each_entry(ops, &link_ops, list) {
 281                if (!strcmp(ops->kind, kind))
 282                        return ops;
 283        }
 284        return NULL;
 285}
 286
 287/**
 288 * __rtnl_link_register - Register rtnl_link_ops with rtnetlink.
 289 * @ops: struct rtnl_link_ops * to register
 290 *
 291 * The caller must hold the rtnl_mutex. This function should be used
 292 * by drivers that create devices during module initialization. It
 293 * must be called before registering the devices.
 294 *
 295 * Returns 0 on success or a negative error code.
 296 */
 297int __rtnl_link_register(struct rtnl_link_ops *ops)
 298{
 299        if (rtnl_link_ops_get(ops->kind))
 300                return -EEXIST;
 301
 302        if (!ops->dellink)
 303                ops->dellink = unregister_netdevice_queue;
 304
 305        list_add_tail(&ops->list, &link_ops);
 306        return 0;
 307}
 308EXPORT_SYMBOL_GPL(__rtnl_link_register);
 309
 310/**
 311 * rtnl_link_register - Register rtnl_link_ops with rtnetlink.
 312 * @ops: struct rtnl_link_ops * to register
 313 *
 314 * Returns 0 on success or a negative error code.
 315 */
 316int rtnl_link_register(struct rtnl_link_ops *ops)
 317{
 318        int err;
 319
 320        rtnl_lock();
 321        err = __rtnl_link_register(ops);
 322        rtnl_unlock();
 323        return err;
 324}
 325EXPORT_SYMBOL_GPL(rtnl_link_register);
 326
 327static void __rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops)
 328{
 329        struct net_device *dev;
 330        LIST_HEAD(list_kill);
 331
 332        for_each_netdev(net, dev) {
 333                if (dev->rtnl_link_ops == ops)
 334                        ops->dellink(dev, &list_kill);
 335        }
 336        unregister_netdevice_many(&list_kill);
 337}
 338
 339/**
 340 * __rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink.
 341 * @ops: struct rtnl_link_ops * to unregister
 342 *
 343 * The caller must hold the rtnl_mutex.
 344 */
 345void __rtnl_link_unregister(struct rtnl_link_ops *ops)
 346{
 347        struct net *net;
 348
 349        for_each_net(net) {
 350                __rtnl_kill_links(net, ops);
 351        }
 352        list_del(&ops->list);
 353}
 354EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
 355
 356/**
 357 * rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink.
 358 * @ops: struct rtnl_link_ops * to unregister
 359 */
 360void rtnl_link_unregister(struct rtnl_link_ops *ops)
 361{
 362        rtnl_lock();
 363        __rtnl_link_unregister(ops);
 364        rtnl_unlock();
 365}
 366EXPORT_SYMBOL_GPL(rtnl_link_unregister);
 367
 368static size_t rtnl_link_get_size(const struct net_device *dev)
 369{
 370        const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
 371        size_t size;
 372
 373        if (!ops)
 374                return 0;
 375
 376        size = nla_total_size(sizeof(struct nlattr)) + /* IFLA_LINKINFO */
 377               nla_total_size(strlen(ops->kind) + 1);  /* IFLA_INFO_KIND */
 378
 379        if (ops->get_size)
 380                /* IFLA_INFO_DATA + nested data */
 381                size += nla_total_size(sizeof(struct nlattr)) +
 382                        ops->get_size(dev);
 383
 384        if (ops->get_xstats_size)
 385                /* IFLA_INFO_XSTATS */
 386                size += nla_total_size(ops->get_xstats_size(dev));
 387
 388        return size;
 389}
 390
 391static LIST_HEAD(rtnl_af_ops);
 392
 393static const struct rtnl_af_ops *rtnl_af_lookup(const int family)
 394{
 395        const struct rtnl_af_ops *ops;
 396
 397        list_for_each_entry(ops, &rtnl_af_ops, list) {
 398                if (ops->family == family)
 399                        return ops;
 400        }
 401
 402        return NULL;
 403}
 404
 405/**
 406 * __rtnl_af_register - Register rtnl_af_ops with rtnetlink.
 407 * @ops: struct rtnl_af_ops * to register
 408 *
 409 * The caller must hold the rtnl_mutex.
 410 *
 411 * Returns 0 on success or a negative error code.
 412 */
 413int __rtnl_af_register(struct rtnl_af_ops *ops)
 414{
 415        list_add_tail(&ops->list, &rtnl_af_ops);
 416        return 0;
 417}
 418EXPORT_SYMBOL_GPL(__rtnl_af_register);
 419
 420/**
 421 * rtnl_af_register - Register rtnl_af_ops with rtnetlink.
 422 * @ops: struct rtnl_af_ops * to register
 423 *
 424 * Returns 0 on success or a negative error code.
 425 */
 426int rtnl_af_register(struct rtnl_af_ops *ops)
 427{
 428        int err;
 429
 430        rtnl_lock();
 431        err = __rtnl_af_register(ops);
 432        rtnl_unlock();
 433        return err;
 434}
 435EXPORT_SYMBOL_GPL(rtnl_af_register);
 436
 437/**
 438 * __rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink.
 439 * @ops: struct rtnl_af_ops * to unregister
 440 *
 441 * The caller must hold the rtnl_mutex.
 442 */
 443void __rtnl_af_unregister(struct rtnl_af_ops *ops)
 444{
 445        list_del(&ops->list);
 446}
 447EXPORT_SYMBOL_GPL(__rtnl_af_unregister);
 448
 449/**
 450 * rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink.
 451 * @ops: struct rtnl_af_ops * to unregister
 452 */
 453void rtnl_af_unregister(struct rtnl_af_ops *ops)
 454{
 455        rtnl_lock();
 456        __rtnl_af_unregister(ops);
 457        rtnl_unlock();
 458}
 459EXPORT_SYMBOL_GPL(rtnl_af_unregister);
 460
 461static size_t rtnl_link_get_af_size(const struct net_device *dev)
 462{
 463        struct rtnl_af_ops *af_ops;
 464        size_t size;
 465
 466        /* IFLA_AF_SPEC */
 467        size = nla_total_size(sizeof(struct nlattr));
 468
 469        list_for_each_entry(af_ops, &rtnl_af_ops, list) {
 470                if (af_ops->get_link_af_size) {
 471                        /* AF_* + nested data */
 472                        size += nla_total_size(sizeof(struct nlattr)) +
 473                                af_ops->get_link_af_size(dev);
 474                }
 475        }
 476
 477        return size;
 478}
 479
 480static int rtnl_link_fill(struct sk_buff *skb, const struct net_device *dev)
 481{
 482        const struct rtnl_link_ops *ops = dev->rtnl_link_ops;
 483        struct nlattr *linkinfo, *data;
 484        int err = -EMSGSIZE;
 485
 486        linkinfo = nla_nest_start(skb, IFLA_LINKINFO);
 487        if (linkinfo == NULL)
 488                goto out;
 489
 490        if (nla_put_string(skb, IFLA_INFO_KIND, ops->kind) < 0)
 491                goto err_cancel_link;
 492        if (ops->fill_xstats) {
 493                err = ops->fill_xstats(skb, dev);
 494                if (err < 0)
 495                        goto err_cancel_link;
 496        }
 497        if (ops->fill_info) {
 498                data = nla_nest_start(skb, IFLA_INFO_DATA);
 499                if (data == NULL)
 500                        goto err_cancel_link;
 501                err = ops->fill_info(skb, dev);
 502                if (err < 0)
 503                        goto err_cancel_data;
 504                nla_nest_end(skb, data);
 505        }
 506
 507        nla_nest_end(skb, linkinfo);
 508        return 0;
 509
 510err_cancel_data:
 511        nla_nest_cancel(skb, data);
 512err_cancel_link:
 513        nla_nest_cancel(skb, linkinfo);
 514out:
 515        return err;
 516}
 517
 518static const int rtm_min[RTM_NR_FAMILIES] =
 519{
 520        [RTM_FAM(RTM_NEWLINK)]      = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
 521        [RTM_FAM(RTM_NEWADDR)]      = NLMSG_LENGTH(sizeof(struct ifaddrmsg)),
 522        [RTM_FAM(RTM_NEWROUTE)]     = NLMSG_LENGTH(sizeof(struct rtmsg)),
 523        [RTM_FAM(RTM_NEWRULE)]      = NLMSG_LENGTH(sizeof(struct fib_rule_hdr)),
 524        [RTM_FAM(RTM_NEWQDISC)]     = NLMSG_LENGTH(sizeof(struct tcmsg)),
 525        [RTM_FAM(RTM_NEWTCLASS)]    = NLMSG_LENGTH(sizeof(struct tcmsg)),
 526        [RTM_FAM(RTM_NEWTFILTER)]   = NLMSG_LENGTH(sizeof(struct tcmsg)),
 527        [RTM_FAM(RTM_NEWACTION)]    = NLMSG_LENGTH(sizeof(struct tcamsg)),
 528        [RTM_FAM(RTM_GETMULTICAST)] = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
 529        [RTM_FAM(RTM_GETANYCAST)]   = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
 530};
 531
 532static const int rta_max[RTM_NR_FAMILIES] =
 533{
 534        [RTM_FAM(RTM_NEWLINK)]      = IFLA_MAX,
 535        [RTM_FAM(RTM_NEWADDR)]      = IFA_MAX,
 536        [RTM_FAM(RTM_NEWROUTE)]     = RTA_MAX,
 537        [RTM_FAM(RTM_NEWRULE)]      = FRA_MAX,
 538        [RTM_FAM(RTM_NEWQDISC)]     = TCA_MAX,
 539        [RTM_FAM(RTM_NEWTCLASS)]    = TCA_MAX,
 540        [RTM_FAM(RTM_NEWTFILTER)]   = TCA_MAX,
 541        [RTM_FAM(RTM_NEWACTION)]    = TCAA_MAX,
 542};
 543
 544int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, int echo)
 545{
 546        struct sock *rtnl = net->rtnl;
 547        int err = 0;
 548
 549        NETLINK_CB(skb).dst_group = group;
 550        if (echo)
 551                atomic_inc(&skb->users);
 552        netlink_broadcast(rtnl, skb, pid, group, GFP_KERNEL);
 553        if (echo)
 554                err = netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
 555        return err;
 556}
 557
 558int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid)
 559{
 560        struct sock *rtnl = net->rtnl;
 561
 562        return nlmsg_unicast(rtnl, skb, pid);
 563}
 564EXPORT_SYMBOL(rtnl_unicast);
 565
 566void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group,
 567                 struct nlmsghdr *nlh, gfp_t flags)
 568{
 569        struct sock *rtnl = net->rtnl;
 570        int report = 0;
 571
 572        if (nlh)
 573                report = nlmsg_report(nlh);
 574
 575        nlmsg_notify(rtnl, skb, pid, group, report, flags);
 576}
 577EXPORT_SYMBOL(rtnl_notify);
 578
 579void rtnl_set_sk_err(struct net *net, u32 group, int error)
 580{
 581        struct sock *rtnl = net->rtnl;
 582
 583        netlink_set_err(rtnl, 0, group, error);
 584}
 585EXPORT_SYMBOL(rtnl_set_sk_err);
 586
 587int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
 588{
 589        struct nlattr *mx;
 590        int i, valid = 0;
 591
 592        mx = nla_nest_start(skb, RTA_METRICS);
 593        if (mx == NULL)
 594                return -ENOBUFS;
 595
 596        for (i = 0; i < RTAX_MAX; i++) {
 597                if (metrics[i]) {
 598                        valid++;
 599                        if (nla_put_u32(skb, i+1, metrics[i]))
 600                                goto nla_put_failure;
 601                }
 602        }
 603
 604        if (!valid) {
 605                nla_nest_cancel(skb, mx);
 606                return 0;
 607        }
 608
 609        return nla_nest_end(skb, mx);
 610
 611nla_put_failure:
 612        nla_nest_cancel(skb, mx);
 613        return -EMSGSIZE;
 614}
 615EXPORT_SYMBOL(rtnetlink_put_metrics);
 616
 617int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
 618                       long expires, u32 error)
 619{
 620        struct rta_cacheinfo ci = {
 621                .rta_lastuse = jiffies_to_clock_t(jiffies - dst->lastuse),
 622                .rta_used = dst->__use,
 623                .rta_clntref = atomic_read(&(dst->__refcnt)),
 624                .rta_error = error,
 625                .rta_id =  id,
 626        };
 627
 628        if (expires) {
 629                unsigned long clock;
 630
 631                clock = jiffies_to_clock_t(abs(expires));
 632                clock = min_t(unsigned long, clock, INT_MAX);
 633                ci.rta_expires = (expires > 0) ? clock : -clock;
 634        }
 635        return nla_put(skb, RTA_CACHEINFO, sizeof(ci), &ci);
 636}
 637EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo);
 638
 639static void set_operstate(struct net_device *dev, unsigned char transition)
 640{
 641        unsigned char operstate = dev->operstate;
 642
 643        switch (transition) {
 644        case IF_OPER_UP:
 645                if ((operstate == IF_OPER_DORMANT ||
 646                     operstate == IF_OPER_UNKNOWN) &&
 647                    !netif_dormant(dev))
 648                        operstate = IF_OPER_UP;
 649                break;
 650
 651        case IF_OPER_DORMANT:
 652                if (operstate == IF_OPER_UP ||
 653                    operstate == IF_OPER_UNKNOWN)
 654                        operstate = IF_OPER_DORMANT;
 655                break;
 656        }
 657
 658        if (dev->operstate != operstate) {
 659                write_lock_bh(&dev_base_lock);
 660                dev->operstate = operstate;
 661                write_unlock_bh(&dev_base_lock);
 662                netdev_state_change(dev);
 663        }
 664}
 665
 666static unsigned int rtnl_dev_get_flags(const struct net_device *dev)
 667{
 668        return (dev->flags & ~(IFF_PROMISC | IFF_ALLMULTI)) |
 669               (dev->gflags & (IFF_PROMISC | IFF_ALLMULTI));
 670}
 671
 672static unsigned int rtnl_dev_combine_flags(const struct net_device *dev,
 673                                           const struct ifinfomsg *ifm)
 674{
 675        unsigned int flags = ifm->ifi_flags;
 676
 677        /* bugwards compatibility: ifi_change == 0 is treated as ~0 */
 678        if (ifm->ifi_change)
 679                flags = (flags & ifm->ifi_change) |
 680                        (rtnl_dev_get_flags(dev) & ~ifm->ifi_change);
 681
 682        return flags;
 683}
 684
 685static void copy_rtnl_link_stats(struct rtnl_link_stats *a,
 686                                 const struct rtnl_link_stats64 *b)
 687{
 688        a->rx_packets = b->rx_packets;
 689        a->tx_packets = b->tx_packets;
 690        a->rx_bytes = b->rx_bytes;
 691        a->tx_bytes = b->tx_bytes;
 692        a->rx_errors = b->rx_errors;
 693        a->tx_errors = b->tx_errors;
 694        a->rx_dropped = b->rx_dropped;
 695        a->tx_dropped = b->tx_dropped;
 696
 697        a->multicast = b->multicast;
 698        a->collisions = b->collisions;
 699
 700        a->rx_length_errors = b->rx_length_errors;
 701        a->rx_over_errors = b->rx_over_errors;
 702        a->rx_crc_errors = b->rx_crc_errors;
 703        a->rx_frame_errors = b->rx_frame_errors;
 704        a->rx_fifo_errors = b->rx_fifo_errors;
 705        a->rx_missed_errors = b->rx_missed_errors;
 706
 707        a->tx_aborted_errors = b->tx_aborted_errors;
 708        a->tx_carrier_errors = b->tx_carrier_errors;
 709        a->tx_fifo_errors = b->tx_fifo_errors;
 710        a->tx_heartbeat_errors = b->tx_heartbeat_errors;
 711        a->tx_window_errors = b->tx_window_errors;
 712
 713        a->rx_compressed = b->rx_compressed;
 714        a->tx_compressed = b->tx_compressed;
 715}
 716
 717static void copy_rtnl_link_stats64(void *v, const struct rtnl_link_stats64 *b)
 718{
 719        memcpy(v, b, sizeof(*b));
 720}
 721
 722/* All VF info */
 723static inline int rtnl_vfinfo_size(const struct net_device *dev,
 724                                   u32 ext_filter_mask)
 725{
 726        if (dev->dev.parent && dev_is_pci(dev->dev.parent) &&
 727            (ext_filter_mask & RTEXT_FILTER_VF)) {
 728                int num_vfs = dev_num_vf(dev->dev.parent);
 729                size_t size = nla_total_size(sizeof(struct nlattr));
 730                size += nla_total_size(num_vfs * sizeof(struct nlattr));
 731                size += num_vfs *
 732                        (nla_total_size(sizeof(struct ifla_vf_mac)) +
 733                         nla_total_size(sizeof(struct ifla_vf_vlan)) +
 734                         nla_total_size(sizeof(struct ifla_vf_tx_rate)) +
 735                         nla_total_size(sizeof(struct ifla_vf_spoofchk)));
 736                return size;
 737        } else
 738                return 0;
 739}
 740
 741static size_t rtnl_port_size(const struct net_device *dev)
 742{
 743        size_t port_size = nla_total_size(4)            /* PORT_VF */
 744                + nla_total_size(PORT_PROFILE_MAX)      /* PORT_PROFILE */
 745                + nla_total_size(sizeof(struct ifla_port_vsi))
 746                                                        /* PORT_VSI_TYPE */
 747                + nla_total_size(PORT_UUID_MAX)         /* PORT_INSTANCE_UUID */
 748                + nla_total_size(PORT_UUID_MAX)         /* PORT_HOST_UUID */
 749                + nla_total_size(1)                     /* PROT_VDP_REQUEST */
 750                + nla_total_size(2);                    /* PORT_VDP_RESPONSE */
 751        size_t vf_ports_size = nla_total_size(sizeof(struct nlattr));
 752        size_t vf_port_size = nla_total_size(sizeof(struct nlattr))
 753                + port_size;
 754        size_t port_self_size = nla_total_size(sizeof(struct nlattr))
 755                + port_size;
 756
 757        if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent)
 758                return 0;
 759        if (dev_num_vf(dev->dev.parent))
 760                return port_self_size + vf_ports_size +
 761                        vf_port_size * dev_num_vf(dev->dev.parent);
 762        else
 763                return port_self_size;
 764}
 765
 766static noinline size_t if_nlmsg_size(const struct net_device *dev,
 767                                     u32 ext_filter_mask)
 768{
 769        return NLMSG_ALIGN(sizeof(struct ifinfomsg))
 770               + nla_total_size(IFNAMSIZ) /* IFLA_IFNAME */
 771               + nla_total_size(IFALIASZ) /* IFLA_IFALIAS */
 772               + nla_total_size(IFNAMSIZ) /* IFLA_QDISC */
 773               + nla_total_size(sizeof(struct rtnl_link_ifmap))
 774               + nla_total_size(sizeof(struct rtnl_link_stats))
 775               + nla_total_size(sizeof(struct rtnl_link_stats64))
 776               + nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */
 777               + nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */
 778               + nla_total_size(4) /* IFLA_TXQLEN */
 779               + nla_total_size(4) /* IFLA_WEIGHT */
 780               + nla_total_size(4) /* IFLA_MTU */
 781               + nla_total_size(4) /* IFLA_LINK */
 782               + nla_total_size(4) /* IFLA_MASTER */
 783               + nla_total_size(4) /* IFLA_PROMISCUITY */
 784               + nla_total_size(4) /* IFLA_NUM_TX_QUEUES */
 785               + nla_total_size(4) /* IFLA_NUM_RX_QUEUES */
 786               + nla_total_size(1) /* IFLA_OPERSTATE */
 787               + nla_total_size(1) /* IFLA_LINKMODE */
 788               + nla_total_size(ext_filter_mask
 789                                & RTEXT_FILTER_VF ? 4 : 0) /* IFLA_NUM_VF */
 790               + rtnl_vfinfo_size(dev, ext_filter_mask) /* IFLA_VFINFO_LIST */
 791               + rtnl_port_size(dev) /* IFLA_VF_PORTS + IFLA_PORT_SELF */
 792               + rtnl_link_get_size(dev) /* IFLA_LINKINFO */
 793               + rtnl_link_get_af_size(dev); /* IFLA_AF_SPEC */
 794}
 795
 796static int rtnl_vf_ports_fill(struct sk_buff *skb, struct net_device *dev)
 797{
 798        struct nlattr *vf_ports;
 799        struct nlattr *vf_port;
 800        int vf;
 801        int err;
 802
 803        vf_ports = nla_nest_start(skb, IFLA_VF_PORTS);
 804        if (!vf_ports)
 805                return -EMSGSIZE;
 806
 807        for (vf = 0; vf < dev_num_vf(dev->dev.parent); vf++) {
 808                vf_port = nla_nest_start(skb, IFLA_VF_PORT);
 809                if (!vf_port)
 810                        goto nla_put_failure;
 811                if (nla_put_u32(skb, IFLA_PORT_VF, vf))
 812                        goto nla_put_failure;
 813                err = dev->netdev_ops->ndo_get_vf_port(dev, vf, skb);
 814                if (err == -EMSGSIZE)
 815                        goto nla_put_failure;
 816                if (err) {
 817                        nla_nest_cancel(skb, vf_port);
 818                        continue;
 819                }
 820                nla_nest_end(skb, vf_port);
 821        }
 822
 823        nla_nest_end(skb, vf_ports);
 824
 825        return 0;
 826
 827nla_put_failure:
 828        nla_nest_cancel(skb, vf_ports);
 829        return -EMSGSIZE;
 830}
 831
 832static int rtnl_port_self_fill(struct sk_buff *skb, struct net_device *dev)
 833{
 834        struct nlattr *port_self;
 835        int err;
 836
 837        port_self = nla_nest_start(skb, IFLA_PORT_SELF);
 838        if (!port_self)
 839                return -EMSGSIZE;
 840
 841        err = dev->netdev_ops->ndo_get_vf_port(dev, PORT_SELF_VF, skb);
 842        if (err) {
 843                nla_nest_cancel(skb, port_self);
 844                return (err == -EMSGSIZE) ? err : 0;
 845        }
 846
 847        nla_nest_end(skb, port_self);
 848
 849        return 0;
 850}
 851
 852static int rtnl_port_fill(struct sk_buff *skb, struct net_device *dev)
 853{
 854        int err;
 855
 856        if (!dev->netdev_ops->ndo_get_vf_port || !dev->dev.parent)
 857                return 0;
 858
 859        err = rtnl_port_self_fill(skb, dev);
 860        if (err)
 861                return err;
 862
 863        if (dev_num_vf(dev->dev.parent)) {
 864                err = rtnl_vf_ports_fill(skb, dev);
 865                if (err)
 866                        return err;
 867        }
 868
 869        return 0;
 870}
 871
 872static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
 873                            int type, u32 pid, u32 seq, u32 change,
 874                            unsigned int flags, u32 ext_filter_mask)
 875{
 876        struct ifinfomsg *ifm;
 877        struct nlmsghdr *nlh;
 878        struct rtnl_link_stats64 temp;
 879        const struct rtnl_link_stats64 *stats;
 880        struct nlattr *attr, *af_spec;
 881        struct rtnl_af_ops *af_ops;
 882
 883        ASSERT_RTNL();
 884        nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags);
 885        if (nlh == NULL)
 886                return -EMSGSIZE;
 887
 888        ifm = nlmsg_data(nlh);
 889        ifm->ifi_family = AF_UNSPEC;
 890        ifm->__ifi_pad = 0;
 891        ifm->ifi_type = dev->type;
 892        ifm->ifi_index = dev->ifindex;
 893        ifm->ifi_flags = dev_get_flags(dev);
 894        ifm->ifi_change = change;
 895
 896        if (nla_put_string(skb, IFLA_IFNAME, dev->name) ||
 897            nla_put_u32(skb, IFLA_TXQLEN, dev->tx_queue_len) ||
 898            nla_put_u8(skb, IFLA_OPERSTATE,
 899                       netif_running(dev) ? dev->operstate : IF_OPER_DOWN) ||
 900            nla_put_u8(skb, IFLA_LINKMODE, dev->link_mode) ||
 901            nla_put_u32(skb, IFLA_MTU, dev->mtu) ||
 902            nla_put_u32(skb, IFLA_GROUP, dev->group) ||
 903            nla_put_u32(skb, IFLA_PROMISCUITY, dev->promiscuity) ||
 904            nla_put_u32(skb, IFLA_NUM_TX_QUEUES, dev->num_tx_queues) ||
 905#ifdef CONFIG_RPS
 906            nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) ||
 907#endif
 908            (dev->ifindex != dev->iflink &&
 909             nla_put_u32(skb, IFLA_LINK, dev->iflink)) ||
 910            (dev->master &&
 911             nla_put_u32(skb, IFLA_MASTER, dev->master->ifindex)) ||
 912            (dev->qdisc &&
 913             nla_put_string(skb, IFLA_QDISC, dev->qdisc->ops->id)) ||
 914            (dev->ifalias &&
 915             nla_put_string(skb, IFLA_IFALIAS, dev->ifalias)))
 916                goto nla_put_failure;
 917
 918        if (1) {
 919                struct rtnl_link_ifmap map = {
 920                        .mem_start   = dev->mem_start,
 921                        .mem_end     = dev->mem_end,
 922                        .base_addr   = dev->base_addr,
 923                        .irq         = dev->irq,
 924                        .dma         = dev->dma,
 925                        .port        = dev->if_port,
 926                };
 927                if (nla_put(skb, IFLA_MAP, sizeof(map), &map))
 928                        goto nla_put_failure;
 929        }
 930
 931        if (dev->addr_len) {
 932                if (nla_put(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr) ||
 933                    nla_put(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast))
 934                        goto nla_put_failure;
 935        }
 936
 937        attr = nla_reserve(skb, IFLA_STATS,
 938                        sizeof(struct rtnl_link_stats));
 939        if (attr == NULL)
 940                goto nla_put_failure;
 941
 942        stats = dev_get_stats(dev, &temp);
 943        copy_rtnl_link_stats(nla_data(attr), stats);
 944
 945        attr = nla_reserve(skb, IFLA_STATS64,
 946                        sizeof(struct rtnl_link_stats64));
 947        if (attr == NULL)
 948                goto nla_put_failure;
 949        copy_rtnl_link_stats64(nla_data(attr), stats);
 950
 951        if (dev->dev.parent && (ext_filter_mask & RTEXT_FILTER_VF) &&
 952            nla_put_u32(skb, IFLA_NUM_VF, dev_num_vf(dev->dev.parent)))
 953                goto nla_put_failure;
 954
 955        if (dev->netdev_ops->ndo_get_vf_config && dev->dev.parent
 956            && (ext_filter_mask & RTEXT_FILTER_VF)) {
 957                int i;
 958
 959                struct nlattr *vfinfo, *vf;
 960                int num_vfs = dev_num_vf(dev->dev.parent);
 961
 962                vfinfo = nla_nest_start(skb, IFLA_VFINFO_LIST);
 963                if (!vfinfo)
 964                        goto nla_put_failure;
 965                for (i = 0; i < num_vfs; i++) {
 966                        struct ifla_vf_info ivi;
 967                        struct ifla_vf_mac vf_mac;
 968                        struct ifla_vf_vlan vf_vlan;
 969                        struct ifla_vf_tx_rate vf_tx_rate;
 970                        struct ifla_vf_spoofchk vf_spoofchk;
 971
 972                        /*
 973                         * Not all SR-IOV capable drivers support the
 974                         * spoofcheck query.  Preset to -1 so the user
 975                         * space tool can detect that the driver didn't
 976                         * report anything.
 977                         */
 978                        ivi.spoofchk = -1;
 979                        if (dev->netdev_ops->ndo_get_vf_config(dev, i, &ivi))
 980                                break;
 981                        vf_mac.vf =
 982                                vf_vlan.vf =
 983                                vf_tx_rate.vf =
 984                                vf_spoofchk.vf = ivi.vf;
 985
 986                        memcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac));
 987                        vf_vlan.vlan = ivi.vlan;
 988                        vf_vlan.qos = ivi.qos;
 989                        vf_tx_rate.rate = ivi.tx_rate;
 990                        vf_spoofchk.setting = ivi.spoofchk;
 991                        vf = nla_nest_start(skb, IFLA_VF_INFO);
 992                        if (!vf) {
 993                                nla_nest_cancel(skb, vfinfo);
 994                                goto nla_put_failure;
 995                        }
 996                        if (nla_put(skb, IFLA_VF_MAC, sizeof(vf_mac), &vf_mac) ||
 997                            nla_put(skb, IFLA_VF_VLAN, sizeof(vf_vlan), &vf_vlan) ||
 998                            nla_put(skb, IFLA_VF_TX_RATE, sizeof(vf_tx_rate),
 999                                    &vf_tx_rate) ||
1000                            nla_put(skb, IFLA_VF_SPOOFCHK, sizeof(vf_spoofchk),
1001                                    &vf_spoofchk))
1002                                goto nla_put_failure;
1003                        nla_nest_end(skb, vf);
1004                }
1005                nla_nest_end(skb, vfinfo);
1006        }
1007
1008        if (rtnl_port_fill(skb, dev))
1009                goto nla_put_failure;
1010
1011        if (dev->rtnl_link_ops) {
1012                if (rtnl_link_fill(skb, dev) < 0)
1013                        goto nla_put_failure;
1014        }
1015
1016        if (!(af_spec = nla_nest_start(skb, IFLA_AF_SPEC)))
1017                goto nla_put_failure;
1018
1019        list_for_each_entry(af_ops, &rtnl_af_ops, list) {
1020                if (af_ops->fill_link_af) {
1021                        struct nlattr *af;
1022                        int err;
1023
1024                        if (!(af = nla_nest_start(skb, af_ops->family)))
1025                                goto nla_put_failure;
1026
1027                        err = af_ops->fill_link_af(skb, dev);
1028
1029                        /*
1030                         * Caller may return ENODATA to indicate that there
1031                         * was no data to be dumped. This is not an error, it
1032                         * means we should trim the attribute header and
1033                         * continue.
1034                         */
1035                        if (err == -ENODATA)
1036                                nla_nest_cancel(skb, af);
1037                        else if (err < 0)
1038                                goto nla_put_failure;
1039
1040                        nla_nest_end(skb, af);
1041                }
1042        }
1043
1044        nla_nest_end(skb, af_spec);
1045
1046        return nlmsg_end(skb, nlh);
1047
1048nla_put_failure:
1049        nlmsg_cancel(skb, nlh);
1050        return -EMSGSIZE;
1051}
1052
1053static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
1054{
1055        struct net *net = sock_net(skb->sk);
1056        int h, s_h;
1057        int idx = 0, s_idx;
1058        struct net_device *dev;
1059        struct hlist_head *head;
1060        struct hlist_node *node;
1061        struct nlattr *tb[IFLA_MAX+1];
1062        u32 ext_filter_mask = 0;
1063
1064        s_h = cb->args[0];
1065        s_idx = cb->args[1];
1066
1067        rcu_read_lock();
1068        cb->seq = net->dev_base_seq;
1069
1070        if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
1071                        ifla_policy) >= 0) {
1072
1073                if (tb[IFLA_EXT_MASK])
1074                        ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
1075        }
1076
1077        for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
1078                idx = 0;
1079                head = &net->dev_index_head[h];
1080                hlist_for_each_entry_rcu(dev, node, head, index_hlist) {
1081                        if (idx < s_idx)
1082                                goto cont;
1083                        if (rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
1084                                             NETLINK_CB(cb->skb).pid,
1085                                             cb->nlh->nlmsg_seq, 0,
1086                                             NLM_F_MULTI,
1087                                             ext_filter_mask) <= 0)
1088                                goto out;
1089
1090                        nl_dump_check_consistent(cb, nlmsg_hdr(skb));
1091cont:
1092                        idx++;
1093                }
1094        }
1095out:
1096        rcu_read_unlock();
1097        cb->args[1] = idx;
1098        cb->args[0] = h;
1099
1100        return skb->len;
1101}
1102
1103const struct nla_policy ifla_policy[IFLA_MAX+1] = {
1104        [IFLA_IFNAME]           = { .type = NLA_STRING, .len = IFNAMSIZ-1 },
1105        [IFLA_ADDRESS]          = { .type = NLA_BINARY, .len = MAX_ADDR_LEN },
1106        [IFLA_BROADCAST]        = { .type = NLA_BINARY, .len = MAX_ADDR_LEN },
1107        [IFLA_MAP]              = { .len = sizeof(struct rtnl_link_ifmap) },
1108        [IFLA_MTU]              = { .type = NLA_U32 },
1109        [IFLA_LINK]             = { .type = NLA_U32 },
1110        [IFLA_MASTER]           = { .type = NLA_U32 },
1111        [IFLA_TXQLEN]           = { .type = NLA_U32 },
1112        [IFLA_WEIGHT]           = { .type = NLA_U32 },
1113        [IFLA_OPERSTATE]        = { .type = NLA_U8 },
1114        [IFLA_LINKMODE]         = { .type = NLA_U8 },
1115        [IFLA_LINKINFO]         = { .type = NLA_NESTED },
1116        [IFLA_NET_NS_PID]       = { .type = NLA_U32 },
1117        [IFLA_NET_NS_FD]        = { .type = NLA_U32 },
1118        [IFLA_IFALIAS]          = { .type = NLA_STRING, .len = IFALIASZ-1 },
1119        [IFLA_VFINFO_LIST]      = {. type = NLA_NESTED },
1120        [IFLA_VF_PORTS]         = { .type = NLA_NESTED },
1121        [IFLA_PORT_SELF]        = { .type = NLA_NESTED },
1122        [IFLA_AF_SPEC]          = { .type = NLA_NESTED },
1123        [IFLA_EXT_MASK]         = { .type = NLA_U32 },
1124        [IFLA_PROMISCUITY]      = { .type = NLA_U32 },
1125        [IFLA_NUM_TX_QUEUES]    = { .type = NLA_U32 },
1126        [IFLA_NUM_RX_QUEUES]    = { .type = NLA_U32 },
1127};
1128EXPORT_SYMBOL(ifla_policy);
1129
1130static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
1131        [IFLA_INFO_KIND]        = { .type = NLA_STRING },
1132        [IFLA_INFO_DATA]        = { .type = NLA_NESTED },
1133};
1134
1135static const struct nla_policy ifla_vfinfo_policy[IFLA_VF_INFO_MAX+1] = {
1136        [IFLA_VF_INFO]          = { .type = NLA_NESTED },
1137};
1138
1139static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
1140        [IFLA_VF_MAC]           = { .type = NLA_BINARY,
1141                                    .len = sizeof(struct ifla_vf_mac) },
1142        [IFLA_VF_VLAN]          = { .type = NLA_BINARY,
1143                                    .len = sizeof(struct ifla_vf_vlan) },
1144        [IFLA_VF_TX_RATE]       = { .type = NLA_BINARY,
1145                                    .len = sizeof(struct ifla_vf_tx_rate) },
1146        [IFLA_VF_SPOOFCHK]      = { .type = NLA_BINARY,
1147                                    .len = sizeof(struct ifla_vf_spoofchk) },
1148};
1149
1150static const struct nla_policy ifla_port_policy[IFLA_PORT_MAX+1] = {
1151        [IFLA_PORT_VF]          = { .type = NLA_U32 },
1152        [IFLA_PORT_PROFILE]     = { .type = NLA_STRING,
1153                                    .len = PORT_PROFILE_MAX },
1154        [IFLA_PORT_VSI_TYPE]    = { .type = NLA_BINARY,
1155                                    .len = sizeof(struct ifla_port_vsi)},
1156        [IFLA_PORT_INSTANCE_UUID] = { .type = NLA_BINARY,
1157                                      .len = PORT_UUID_MAX },
1158        [IFLA_PORT_HOST_UUID]   = { .type = NLA_STRING,
1159                                    .len = PORT_UUID_MAX },
1160        [IFLA_PORT_REQUEST]     = { .type = NLA_U8, },
1161        [IFLA_PORT_RESPONSE]    = { .type = NLA_U16, },
1162};
1163
1164struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[])
1165{
1166        struct net *net;
1167        /* Examine the link attributes and figure out which
1168         * network namespace we are talking about.
1169         */
1170        if (tb[IFLA_NET_NS_PID])
1171                net = get_net_ns_by_pid(nla_get_u32(tb[IFLA_NET_NS_PID]));
1172        else if (tb[IFLA_NET_NS_FD])
1173                net = get_net_ns_by_fd(nla_get_u32(tb[IFLA_NET_NS_FD]));
1174        else
1175                net = get_net(src_net);
1176        return net;
1177}
1178EXPORT_SYMBOL(rtnl_link_get_net);
1179
1180static int validate_linkmsg(struct net_device *dev, struct nlattr *tb[])
1181{
1182        if (dev) {
1183                if (tb[IFLA_ADDRESS] &&
1184                    nla_len(tb[IFLA_ADDRESS]) < dev->addr_len)
1185                        return -EINVAL;
1186
1187                if (tb[IFLA_BROADCAST] &&
1188                    nla_len(tb[IFLA_BROADCAST]) < dev->addr_len)
1189                        return -EINVAL;
1190        }
1191
1192        if (tb[IFLA_AF_SPEC]) {
1193                struct nlattr *af;
1194                int rem, err;
1195
1196                nla_for_each_nested(af, tb[IFLA_AF_SPEC], rem) {
1197                        const struct rtnl_af_ops *af_ops;
1198
1199                        if (!(af_ops = rtnl_af_lookup(nla_type(af))))
1200                                return -EAFNOSUPPORT;
1201
1202                        if (!af_ops->set_link_af)
1203                                return -EOPNOTSUPP;
1204
1205                        if (af_ops->validate_link_af) {
1206                                err = af_ops->validate_link_af(dev, af);
1207                                if (err < 0)
1208                                        return err;
1209                        }
1210                }
1211        }
1212
1213        return 0;
1214}
1215
1216static int do_setvfinfo(struct net_device *dev, struct nlattr *attr)
1217{
1218        int rem, err = -EINVAL;
1219        struct nlattr *vf;
1220        const struct net_device_ops *ops = dev->netdev_ops;
1221
1222        nla_for_each_nested(vf, attr, rem) {
1223                switch (nla_type(vf)) {
1224                case IFLA_VF_MAC: {
1225                        struct ifla_vf_mac *ivm;
1226                        ivm = nla_data(vf);
1227                        err = -EOPNOTSUPP;
1228                        if (ops->ndo_set_vf_mac)
1229                                err = ops->ndo_set_vf_mac(dev, ivm->vf,
1230                                                          ivm->mac);
1231                        break;
1232                }
1233                case IFLA_VF_VLAN: {
1234                        struct ifla_vf_vlan *ivv;
1235                        ivv = nla_data(vf);
1236                        err = -EOPNOTSUPP;
1237                        if (ops->ndo_set_vf_vlan)
1238                                err = ops->ndo_set_vf_vlan(dev, ivv->vf,
1239                                                           ivv->vlan,
1240                                                           ivv->qos);
1241                        break;
1242                }
1243                case IFLA_VF_TX_RATE: {
1244                        struct ifla_vf_tx_rate *ivt;
1245                        ivt = nla_data(vf);
1246                        err = -EOPNOTSUPP;
1247                        if (ops->ndo_set_vf_tx_rate)
1248                                err = ops->ndo_set_vf_tx_rate(dev, ivt->vf,
1249                                                              ivt->rate);
1250                        break;
1251                }
1252                case IFLA_VF_SPOOFCHK: {
1253                        struct ifla_vf_spoofchk *ivs;
1254                        ivs = nla_data(vf);
1255                        err = -EOPNOTSUPP;
1256                        if (ops->ndo_set_vf_spoofchk)
1257                                err = ops->ndo_set_vf_spoofchk(dev, ivs->vf,
1258                                                               ivs->setting);
1259                        break;
1260                }
1261                default:
1262                        err = -EINVAL;
1263                        break;
1264                }
1265                if (err)
1266                        break;
1267        }
1268        return err;
1269}
1270
1271static int do_set_master(struct net_device *dev, int ifindex)
1272{
1273        struct net_device *master_dev;
1274        const struct net_device_ops *ops;
1275        int err;
1276
1277        if (dev->master) {
1278                if (dev->master->ifindex == ifindex)
1279                        return 0;
1280                ops = dev->master->netdev_ops;
1281                if (ops->ndo_del_slave) {
1282                        err = ops->ndo_del_slave(dev->master, dev);
1283                        if (err)
1284                                return err;
1285                } else {
1286                        return -EOPNOTSUPP;
1287                }
1288        }
1289
1290        if (ifindex) {
1291                master_dev = __dev_get_by_index(dev_net(dev), ifindex);
1292                if (!master_dev)
1293                        return -EINVAL;
1294                ops = master_dev->netdev_ops;
1295                if (ops->ndo_add_slave) {
1296                        err = ops->ndo_add_slave(master_dev, dev);
1297                        if (err)
1298                                return err;
1299                } else {
1300                        return -EOPNOTSUPP;
1301                }
1302        }
1303        return 0;
1304}
1305
1306static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
1307                      struct nlattr **tb, char *ifname, int modified)
1308{
1309        const struct net_device_ops *ops = dev->netdev_ops;
1310        int send_addr_notify = 0;
1311        int err;
1312
1313        if (tb[IFLA_NET_NS_PID] || tb[IFLA_NET_NS_FD]) {
1314                struct net *net = rtnl_link_get_net(dev_net(dev), tb);
1315                if (IS_ERR(net)) {
1316                        err = PTR_ERR(net);
1317                        goto errout;
1318                }
1319                err = dev_change_net_namespace(dev, net, ifname);
1320                put_net(net);
1321                if (err)
1322                        goto errout;
1323                modified = 1;
1324        }
1325
1326        if (tb[IFLA_MAP]) {
1327                struct rtnl_link_ifmap *u_map;
1328                struct ifmap k_map;
1329
1330                if (!ops->ndo_set_config) {
1331                        err = -EOPNOTSUPP;
1332                        goto errout;
1333                }
1334
1335                if (!netif_device_present(dev)) {
1336                        err = -ENODEV;
1337                        goto errout;
1338                }
1339
1340                u_map = nla_data(tb[IFLA_MAP]);
1341                k_map.mem_start = (unsigned long) u_map->mem_start;
1342                k_map.mem_end = (unsigned long) u_map->mem_end;
1343                k_map.base_addr = (unsigned short) u_map->base_addr;
1344                k_map.irq = (unsigned char) u_map->irq;
1345                k_map.dma = (unsigned char) u_map->dma;
1346                k_map.port = (unsigned char) u_map->port;
1347
1348                err = ops->ndo_set_config(dev, &k_map);
1349                if (err < 0)
1350                        goto errout;
1351
1352                modified = 1;
1353        }
1354
1355        if (tb[IFLA_ADDRESS]) {
1356                struct sockaddr *sa;
1357                int len;
1358
1359                if (!ops->ndo_set_mac_address) {
1360                        err = -EOPNOTSUPP;
1361                        goto errout;
1362                }
1363
1364                if (!netif_device_present(dev)) {
1365                        err = -ENODEV;
1366                        goto errout;
1367                }
1368
1369                len = sizeof(sa_family_t) + dev->addr_len;
1370                sa = kmalloc(len, GFP_KERNEL);
1371                if (!sa) {
1372                        err = -ENOMEM;
1373                        goto errout;
1374                }
1375                sa->sa_family = dev->type;
1376                memcpy(sa->sa_data, nla_data(tb[IFLA_ADDRESS]),
1377                       dev->addr_len);
1378                err = ops->ndo_set_mac_address(dev, sa);
1379                kfree(sa);
1380                if (err)
1381                        goto errout;
1382                send_addr_notify = 1;
1383                modified = 1;
1384                add_device_randomness(dev->dev_addr, dev->addr_len);
1385        }
1386
1387        if (tb[IFLA_MTU]) {
1388                err = dev_set_mtu(dev, nla_get_u32(tb[IFLA_MTU]));
1389                if (err < 0)
1390                        goto errout;
1391                modified = 1;
1392        }
1393
1394        if (tb[IFLA_GROUP]) {
1395                dev_set_group(dev, nla_get_u32(tb[IFLA_GROUP]));
1396                modified = 1;
1397        }
1398
1399        /*
1400         * Interface selected by interface index but interface
1401         * name provided implies that a name change has been
1402         * requested.
1403         */
1404        if (ifm->ifi_index > 0 && ifname[0]) {
1405                err = dev_change_name(dev, ifname);
1406                if (err < 0)
1407                        goto errout;
1408                modified = 1;
1409        }
1410
1411        if (tb[IFLA_IFALIAS]) {
1412                err = dev_set_alias(dev, nla_data(tb[IFLA_IFALIAS]),
1413                                    nla_len(tb[IFLA_IFALIAS]));
1414                if (err < 0)
1415                        goto errout;
1416                modified = 1;
1417        }
1418
1419        if (tb[IFLA_BROADCAST]) {
1420                nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
1421                send_addr_notify = 1;
1422        }
1423
1424        if (ifm->ifi_flags || ifm->ifi_change) {
1425                err = dev_change_flags(dev, rtnl_dev_combine_flags(dev, ifm));
1426                if (err < 0)
1427                        goto errout;
1428        }
1429
1430        if (tb[IFLA_MASTER]) {
1431                err = do_set_master(dev, nla_get_u32(tb[IFLA_MASTER]));
1432                if (err)
1433                        goto errout;
1434                modified = 1;
1435        }
1436
1437        if (tb[IFLA_TXQLEN])
1438                dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
1439
1440        if (tb[IFLA_OPERSTATE])
1441                set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));
1442
1443        if (tb[IFLA_LINKMODE]) {
1444                write_lock_bh(&dev_base_lock);
1445                dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
1446                write_unlock_bh(&dev_base_lock);
1447        }
1448
1449        if (tb[IFLA_VFINFO_LIST]) {
1450                sref">errout;
1357  re"sref">dev, re"rtnetlink.c#L1447" id=O21352 = broadcast, tb[dev, re"rtnelass="sref">IFLA_VFINFO_LIST]) {
14="+csref">dev-><="+csrefa_get_u8" class="sretnetlink.c#L1434" 5ore/rtne) !mode" class="srefe=IFLA__VFIN>[IFLA_VFINFO_LIST]) {
12841431                EINVAL;41433                        goto errout;
1447        }
12841431                 = set_operstate(errout;
1426                if (err < 0)
1433                        goto errout;
1360      a>                modified = 1;
1447        }
1422        }
1431                send_addr_notify = 0;4135441355        if (IFLA_VFINFO_LIST]) {
1450                sref">errout;
u_map->send_addr_notify = 0;41450                sref">errout;
1357  vflink.c#L1434" 5vfrtnetlink.c#L1447" id=O21357  re"sref">dev, re"rtnetlink.c#L1447" id=O21410
1431                err = -EOPNOTSUPP;41359                if (!opvf_ef">u_map->opvf_ef">href="+code=err" class="sref">err)
1373                        goto errout;4135441375 = broadcast, dev, re"rtnelass="sref">IFLA_VFINFO_LIST]) {
14="+csref">dev-><="+csrefa_get_u8" class="sretnetlink.c#L1434" 5ore/rtne) !mode" class="srefe=IFLA__PORTb[err)
errout;41431                14="+cparse_nn clae = u_map->IFLA_IFALIAS]),
1431errout;
14              if (err < 0)
1373                        goto errout;41359   ef">u_map->IFLA_VFINFO_LIST]) {
1431                err = -EOPNOTSUPP;41373                        goto errout;41422        }
1336      vflink.c#L1434" 5vfrtneen" class="sref">tx_queue_len = u_map->errout;412841431                opvf_ef">u_map->opvf_ef">hrefe" class="sref">set_operstate(u_map->errout;414              if (err < 0)
1373                        goto errout;41360      a>                modified = 1;
1422        }
1392        }41431                send_addr_notify = 0;4135441355        if (IFLA_VFINFO_LIST]) {
1450                sref">errout;
u_map->send_addr_notify = 0;4134741388                u_map->IFLA_IFALIAS]),
1355        if (errout;51380                if (err < 0)51381                        goto errout;5144251383                err = -EOPNOTSUPP;51380               if (!opvf_ef">u_map->opvf_ef">href="+code=err" class="sref">err)51388                opvf_ef">u_map->opvf_ef">hrefe" class="sref">set_operstate([u_map->errout;51406                if (err < 0)51407                        goto errout;51408                modified = 1;51409        }5141051411        if (IFLA_VFINFO_LIST]) {51450                sref">errout;
1357  re"sref">dev, re"rtnetlink.c#L1447" id=O2135451375 = broadcast, dev, re"rtnelass="sref">IFLA_VFINFO_LIST]) {51450     _dev_af_             if (!_dev_af_   ;
13475dev-><="+csrefa_get_u8" class="sretflink.c#L1434" 5afrtne))))lass="line" name="L1347">134751431errout;5141051431                op>141_tfhrefe" class="sref">set_operstate(errout;51406                if (err < 0)51407                        goto errout;5135451431                modified = 1;51409        }51447        }51431                send_addr_notify = 0;514295                        goto 1429514              if (ifi_index a>                err < 0)5"A > &lname proIFLA_IFALIAS]),5ifname);51354513a>                err < 0)51446NETDEV_CHANGE=IFL          if (!NETDEV_CHANGE=IFLhref="+code=dev" clasevice_present(ifname);5134751431                ifname);51447        }5141051357  rdev_s0">141     141hrefe="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->err < 0)5IFLA_VFINFO_LIST]) {51450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock);51450     i="+comsg  dev, dev_base_lock);51450      e>_ice_rae = opice_ra;
dev_base_lock);51357  a>                ifname);51450                sref">errout;
nla_get_u32(send_addr_notify = 0;5ifi_index > 0 && [send_addr_notify = 0;5142951431                ->dev, broadcast, errout;514              if (err < 0)51407                        goto errout;5142351411        if (14235broadcast, [errout;5errout;5ifi_index > 0 && '\0'errout;5144851431                EINVAL;51431dev, dev, errout;51404        if (ifm->14235ifm->ifma_get_u8" class="sre=e>u_map->dev, ifm->errout;51411        if (142351444(errout;5errout;51407                        goto errout;51347514evice_present(IFLA_VFINFO_LIST]) {51431                errout;51407                        goto errout;51447        }5144251431                1431141msg          if (errout;514              if (err < 0)51407                        goto errout;5143651431                1431o>141     o>141a_get_u8" class="sreset_operstate(dev, broadcast, errout;5                        goto 142951431                ifname);51447        }51447        }51357  rdev_del>141     1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->1447        }5IFLA_VFINFO_LIST]) {51450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock);51450     _dev_ock<_             if (!_dev_ock<_   ;
dev_base_lock);51450      e>_ice_rae = opice_ra;
dev_base_lock);51450     i="+comsg  dev, dev_base_lock);5ifi_index > 0 && [send_addr_notify = 0;51450                sref">errout;
nla_get_u32(send_addr_notify = 0;51357  a>                ifname);51357  O_LI_HEAD               O_LI_HEADhrefe" class="sref">list_kill               list_kill_lock" class="sref">dev_base_lock);5144251431                ->dev, broadcast, errout;514              if (err < 0)51431                ifname);5143651437        if (142351388broadcast, [14235142961431dev, dev, errout;61404        if (ifm->14236ifm->ifma_get_u8" class="sre=e>u_map->dev, ifm->errout;61411        if (142361444(errout;6errout;6                        return -EINVAL;6134761359   evice_present(13476<9 href="n6t/core/rtnetlink.c#L1399"6id="L6069" class="line" namereturnia>               NODEV    return -errout;6141061357               if (!1431                errout;61359                if (!13476               sref">err = -EOPNOTSUPP;6135461359                if (!141hrefe_u8" class="sreset_operstate(write_ulist_kill               list_kill_lock" class="sref">dev_base_lock);6write_uunregi clr_nntice_ranman         write_ulist_kill               list_kill_lock" class="sref">dev_base_lock);61431write_ulist_kill               list_kill_lock" class="sref">dev_base_lock);6send_addr_notify = 0;61447        }6141061357  rdev_configurep>141          if (!_dev_configurep>141hrefe="L1450">1450      e>_ice_rae = opice_ra;
1450     i="+comsg  dev, 13476IFLA_VFINFO_LIST]) {61357  old_flag           if (!EOPNOTSUPP;61357  a>                ifname);6ifname);6write_uold_flag           if (!1431                EOPNOTSUPP;614s="sref">dev, 1404        if (dev, IFLA_VFINFO_LIST]) {61388                1357  rdev_iceoaomblinfflag           if (!rdev_iceoaomblinfflag hrefe_u8" class="sreset_operstate(1357  s="sref">dev, dev_base_lock);614              if (err < 0)61431                ifname);61447        }6144261431                ifname);61431 = 1357  set_operstate(dev_base_lock);6ifname);6write_u_piceor_notifflag           if (!_piceor_notifflag hrefe_u8" class="sreset_operstate(1357  old_flag           if (!dev_base_lock);6send_addr_notify = 0;61447        }6               XPORT_SYMBO     return -dev_base_lock);6141061450      e>_ice_rae = opice_ra;
1450      e>u_map->1450      e>u_map->IFLA_IFALIAS]),61450     _dev_ock<_             if (!_dev_ock<_   ;
1450                sref">errout;
nla_get_u32(14236IFLA_VFINFO_LIST]) {61357  a>                ifname);61450      e>_ice_rae = opice_ra;
dev_base_lock);61357  num_tx_queue           if (!num_tx_queue href="+ied" class="sref">modified = 1;61357  num_rx_queue           if (!num_rx_queue href="+ied" class="sref">modified = 1;6144861411        if (142361357  num_tx_queue           if (!num_tx_queue href="+">1450        ueue_len = modified = 1;614             if (!134761357  num_tx_queue           if (!num_tx_queue href="+">1450                  if (!errout;6142361411        if (142361450        ueue_len = errout;614             if (!13476ifi_index =um_rx_queue           if (!num_rx_queue href="+">1450                  if (!errout;6144861431                dev_base_lock);61431(1357  s=t; 0 && IFLA_IFALIAS]),61357  num_tx_queue           if (!num_tx_queue hrefdcast" class="sre=um_rx_queue           if (!num_rx_queue hrefle=errout" class="sref">errout;61359   evice_present(13476ifname);6135461359   iceore=nse>u_map->hrefe_u8" class="sreset_operstate(1357  ne>u_map->errout;6write_ur>                1450                  if (!errout;61431                errout;6144861411        if (142361431                1450        ueue_len = errout;61411        if (142361357  mem           1357  n+coref">dev, IFLA_IFALIAS]),61357  nfaclen>dev, errout;61411        if (142361357  mem           1357  n+coref">dev, IFLA_IFALIAS]),61357  nfaclen>dev, errout;61437        if (142361388(1450        ueue_len = errout;61411        if (142361431opoper_oper          if (!">opoper_operhrefe_u8" class="sreset_operstate(1357  n+code=nl8 = errout;61411        if (142361450        ueue_l8 = errout;61411        if (142361444_gro       1357  n+code=nlen = errout;6ifname);61431(dev_base_lock);613476                             142961431errout;61447        }61431errout;6144261357  rdev_gro  oame pr>141          if (!_dev_gro  oame pr>141hrefe="L1450">1450      e>u_map->1357  gro       IFLA_IFALIAS]),61450     i="+comsg  dev, IFLA_IFALIAS]),61450                sref">errout;
nla_get_u32(14236IFLA_VFINFO_LIST]) {61450      e>_ice_rae = opice_ra;
dev_base_lock);61357  a>                ifname);61429714311359   evice_present(IFLA_VFINFO_LIST]) {714evice_present(IFLA_VFINFO_LIST]) {7<2 href="n7t/core/rtnetlink.c#L1392"7id="L7032" class="line" namelass="li="L1431">1431                1431o>141     o>141a_get_u8" class="sreset_operstate(dev, broadcast, errout;714              if (err < 0)71431                ifname);71447        }71447        }7<7 href="n7t/core/rtnetlink.c#L1397"7id="L7047" class="line" name="L1347">13477send_addr_notify = 0;7<9 href="n7t/core/rtnetlink.c#L1399"7id="L7039" cne" name="L1447">1447        }7141071357  rdev_new>141          if (!_dev_new>141hrefe="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->1447        }7IFLA_VFINFO_LIST]) {71450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450     _dev_ock<_             if (!_dev_ock<_   ;
dev_base_lock);71450      e>_ice_rae = opice_ra;
dev_base_lock);71450     i="+comsg  dev, dev_base_lock);7ifi_index kindsref">dev, kinda href="+code=tb" clMODULE_NAME_LENb[dev_base_lock);7ifi_index > 0 && [send_addr_notify = 0;71450                sref">errout;
nla_get_u32(send_addr_notify = 0;71450                sref">errout;
 = [send_addr_notify = 0;71357  a>                ifname);7144271357  CONFIG_MODULEtb[144271450     _epla         1429714297write_ua>                ->dev, broadcast, errout;714              if (err < 0)71431                ifname);7142971411        if (142371357  n+co="Ll           broadcast, [14237errout;7'\0'ifname);7135471359   s="sref">dev, dev, errout;71404        if (ifm->14237ifi_index evice_present(ifm->ifma_get_u8" class="sre=e>u_map->dev, ifm->14237IFLA_VFINFO_LIST]) {714> 0 && 14237ifi_index evice_present(errout;7errout;71431(errout;71447        }7135471359   a>                141msg  nla_get_u32(errout;714              if (err < 0)71431                ifname);7144871411        if (IFLA_VFINFO_LIST]) {71357  a>                dev,   acparse_nesteda_get_u8" class="sre"+coa> = [IFLA_IFALIAS]),71357  11        if (errout;714              if (err < 0)71431                ifname);7errout;7 =  = errout;71436714"+coa> = IFLA_VFINFO_LIST]) {71388dev, kinda hrdcast" class="sre"+coa> = dev, kinda hrlle=errout" class="sref">errout;7dev, kinda hrle=errout" class="sref">errout;7IFLA_VFINFO_LIST]) {7ifi_index kindsref">dev, kinda hre0]="+cspan&&tring">'\0'ifname);7errout;71447        }713547IFLA_VFINFO_LIST]) {71450                sref">errout;
erro;
dev, errout;71450      e>u_map->errout;71448714             if (!IFLA_VFINFO_LIST]) {714             if (! = IFLA_VFINFO_LIST]) {71357  a>                dev,   acparse_nesteda_get_u8" class="sre         sref">erro;
IFLA_IFALIAS]),7 = IFLA_IFALIAS]),7errout;714              if (err < 0)71431                ifname);71357  ref">dev, erro;
ifname);71447        }714             if (!IFLA_VFINFO_LIST]) {71357  a>                1411        if (1359   eef">dev, errout;714              if (err < 0)71431                ifname);71447        }71447        }71354714evice_present(IFLA_VFINFO_LIST]) {71357  modifiedsref">dev, modifiedhref="+ss="sref">send_addr_notify = 0;71347714="    13477               EXISTb[ifname);714="    [13477               OPNOTSUPr = -ifname);71442714"+coa> = IFLA_VFINFO_LIST]) {71359                if (!1431                IFLA_VFINFO_LIST]) {71359                if (!13477               OPNOTSUPr = -ifname);7134771357  a>                nla_get_u32(1359   eef">dev, errout;714              if (err < 0)81431                ifname);81357  modifiedsref">dev, modifiedhref="+ied" class="sref">modified = 1;8<2 href="n8t/core/rtnetlink.c#L1392"8id="L8032" class="line" namelass="line" name="L1447">1447        }8142381431o>141     o>141a_get_u8" class="sreset_operstate(dev, broadcast, dev, modifiedhrefle=errout" class="sref">errout;81447        }814368<7 href="n8t/core/rtnetlink.c#L1397"8id="L8057" class="line" name=e" 3 name="L1411">14="    [IFLA_VFINFO_LIST]) {81404        if (ifm->14238<9 href="n8t/core/rtnetlink.c#L1399"8id="L8069" class="line" nameeeeeeeeeee" namereturnide=dev" class="_dev_gro  oame pr>141          if (!_dev_gro  oame pr>141hrefe">1450      e>u_map->IFLA_IFALIAS]),8 = IFLA_IFALIAS]),8dev, broadcast, errout;8ifname);81447        }81354814s="sref">dev, ifm->13548               OPNOTSUPr = -ifname);8        if (        if (14238               OPNOTSUPr = -ifname);8<9 href="n8t/core/rtnetlink.c#L1419"8id="L8129" class="line" name="L1429">142981359                if (!IFLA_VFINFO_LIST]) {81357  CONFIG_MODULEtb[14428dev, kinda hre0]lass="sref">IFLA_VFINFO_LIST]) {81357  ___dev_unloc1          if (!___dev_unloc1get_ule=errout" class="sref">errout;8"_dev-rout-%s"dev, kinda hrle=errout" class="sref">errout;8errout;81357               if (!dev, kinda hrle=errout" class="sref">errout;814             if (!errout;81407           _epla         errout;8<9 href="n8t/core/rtnetlink.c#L1429"8id="L8269" class="line" nameeeeeeeeene" name="L1447">1447        }814298               OPNOTSUPr = -ifname);81447        }8142381359   > 0 && 142381359   snprintflink.c#L1434" 5"nprintfa_get_u8" class="sre> 0 && "%s%%d"dev, kinda hrle=errout" class="sref">errout;814368ifi_index evstone>u_map->+cod="+code=err" class_dev_ock<_de=nne>u_map-><_dev_ock<_de=nne>hrefe">1450      e>u_map->broadcast, errout;814IS_ERL          if (!aS_ERLa_get_u8" class="sresestone>u_map->+cod)llass="line" name="L1423">14238<9 href="n8t/core/rtnetlink.c#L1439"8id="L8369" class="line" nameeeeeeeeereturni_u8" class="srePTR_ERL          if (!PTR_ERLa_get_u8" class="sresestone>u_map->+cod)e=errout" class="sref">errout;814108141          if (!_dev_creefep>141hrefe_u8" class="srene>u_map->1359   evstone>u_map->+cod="+code=dev" clas> 0 && broadcast, errout;81442814IS_ERL          if (!aS_ERLa_get_u8" class="sreseice_present(142381357  a>                errout;814             if (!142381357  a>                1359   evice_present(nla_get_u32(1359   eef">dev, errout;8errout;81357  a>                 = errout;8<9 href="n8t/core/rtnetlink.c#L1449"8id="L8429" class="line" name="L1429">1429814              if (1359   IS_ERL          if (!aS_ERLa_get_u8" class="sreseice_present(14238errout;814              if (err < 0)81407           ou>u_map->href=ifname" class="sref">ifname);813548141          if (!_dev_configurep>141a_get_u8" class="sreseice_present(dev, errout;814              if (err < 0)814unregister_nntice_rae = errout;8           ou>u_map->href:lass="line" name="L1429">14298errout;81431                ifname);81447        }81447        }8142381357  rdev_g>o>141     1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->1450           1447        }8IFLA_VFINFO_LIST]) {81450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450     i="+comsg  dev, dev_base_lock);8ifi_index > 0 && [send_addr_notify = 0;81450                sref">errout;
nla_get_u32(send_addr_notify = 0;81450      e>_ice_rae = opice_ra;
errout;81450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,nsk"hrefe=errout" class="sref">errout;81357  a>                ifname);814uen = 1357  axt_filter_ma"1     send_addr_notify = 0;813548->dev, broadcast, dev, errout;814              if (err < 0)81431                ifname);8144881411        if (142381450        o="Ll           broadcast, [14238142381411        if ([142381357  axt_filter_ma"1     1450        ode=nlen = [1423813548dev, dev, errout;81404        if (ifm->14238ifi_index evice_present(ifm->ifma_get_u8" class="sre=e>u_map->dev, ifm->errout;81411        if (14238ifi_index evice_present(errout;8errout;8               INVA     return -ifname);81442814evice_present(14238               NODEV = -ifname);8ifname);8broadcast,nsk"href="+code=err" class  msgcnew>dev, errout;814nsk">broadcast,nsk"href="= code=err" classNUL     return -14238               NOBUFtb[ifname);814299broadcast,nsk"href"e59">1359   evice_present((RTM_NEWLINKhref="+code=dev" clasNETLINK_CB    return -sk">broadcast,sk"href).ref="net/core/rpidsref">dev, pidhref=lass="line" name="L1429">14299<1 href="n9t/core/rtnetlink.c#L1391"9id="L9021" class="line" nameeeeeeeeeeeeeeee_u8" class="sre="    ifname);9<2 href="n9t/core/rtnetlink.c#L1392"9id="L9032" class="line" name="L1411">14              if (IFLA_VFINFO_LIST]) {9/* -EMSGSIZE implies BUG in hr_efmsgcsize */IFLA_VFINFO_LIST]) {9<4 href="n9t/core/rtnetlink.c#L1394"9id="L9084" class="line" namename="L1411">14WARN_ON           if (WARN_ONhrefe" class="sref">a>                ifname);9<5 href="n9t/core/rtnetlink.c#L1395"9id="L9075" class="line" name>              kfree_sk">broadcast,kfree_sk"a_get_u8" class="sre=sk">broadcast,nsk"href)=ifname" class="sref">ifname);9<6 href="n9t/core/rtnetlink.c#L1396"9id="L9016" class="li}eelse=errout" class="sref">errout;9<7 href="n9t/core/rtnetlink.c#L1397"9id="L9057" class="line" name_u8" class="srea>                u_map-><_dev_unicas>a_get_u8" class="sre=sk">broadcast,nsk"href"e59">1359   =e>u_map->sk">broadcast,sk"href).ref="net/core/rpidsref">dev, pidhref)=ifname" class="sref">ifname);9<8 href="n9t/core/rtnetlink.c#L1398"9id="L9048" class="line" name="L1448">14489<9 href="n9t/core/rtnetlink.c#L1399"9id="L9069" class="lireturni="L1431">1431                ifname);91447        }91423914ut/core/rtne href=l116" clcode=err" classrdev_calci>u_map-><_dev_calci>hrefe="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->14239IFLA_VFINFO_LIST]) {91450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450      e>_ice_rae = opice_ra;
dev_base_lock1450                sref">errout;
nla_get_u32(send_addr_notify = 0;914uen = 1357  axt_filter_ma"1     send_addr_notify = 0;914ut/core/rtne href=l116" clcode=err" classmin_if"+co_dumpcsize && send_addr_notify = 0;9<9 href="n9t/core/rtnetlink.c#L1419"9id="L9129" class="line" name="L1429">1429914="msgcparsev->1450     rtgenmsg  broadcast, 14299dev, IFLA_VFINFO_LIST]) {91411        if ([142391357  axt_filter_ma"1     1450        ode=nlen = [14231447        }9ifname);91359   axt_filter_ma"1     ifname);91431[dev_base_lock/*IFLA_VFINFO_LIST]) {9<9 href="n9t/core/rtnetlink.c#L1429"9id="L9269" c3span&&amcomment">ine" name* traverse the list of LIS ice_ras and compute the minimumIFLA_VFINFO_LIST]) {9ine" name* buffer"size based upon the filter ma"1.IFLA_VFINFO_LIST]) {9ine" name*/IFLA_VFINFO_LIST]) {91431dev, list_for_each_entr a_get_u8" class="sreseice_present(dev, iceobase_headhref"e59">1359   evi_listsref">dev, iceolistrtne)iss="sref">IFLA_VFINFO_LIST]) {91357  min_if"+co_dumpcsize && 1357  max_tsref">dev, max_ta_get_u8" class="sreut/core/rtne href=l116" cdcast" class="sremin_if"+co_dumpcsize && 142991429914231447        }913479143114231447        }9141091357  rdev_dumpcallu_map-><_dev_dumpcallhrefe="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450      0">141_callbac1          if (! 0">141_callbac1;
broadcast,cbhref)ifname" class="sref">ifname);9IFLA_VFINFO_LIST]) {91357  idm->14231357  s_idm->1357  c">broadcast,cbhrefef="+code=sa" class=famil   dev, famil hrefe=errout" class="srL1423">1423ifname);914s_idm->142391357  s_idm->modified = 1;9140dm->1357  idm->1357  RTNL_FAMILY"srXb[1357  idm->IFLA_VFINFO_LIST]) {9<9 href="n9t/core/rtnetlink.c#L1449"9id="L9469" class="line" name="L1357">1357  type && 1357  c">broadcast,cbhrefef="+code=sa" class=="    1357  RTM_BASEb[142314idm->1357  s_idm->->[ifname);9142314_dev_msgchandler           if (!_dev_msgchandler a href="+code=tb" cl0dm->IFLA_VFINFO_LIST]) {914_dev_msgchandler           if (!_dev_msgchandler a href="+code=tb" cl0dm->14239142314idm->1357  s_idm->1423914memse>u_map->hrefe"srefref="net/core/rc">broadcast,cbhrefef="+code=sa" class=arg           if (!arg a hre0]="0="sizeof(ref="net/core/rc">broadcast,cbhrefef="+code=sa" class=arg           if (!arg a hr)le=errout" class="srL1423">142314_dev_msgchandler           if (!_dev_msgchandler a href="+code=tb" cl0dm->sk">broadcast,sk"hrefdcast" class="srec">broadcast,cbhref)llass="line" name="L1423">1423914231447        }9broadcast,cbhrefef="+code=sa" class=famil   dev, famil href="+357">1357  idm->1423142391431broadcast,sk"hrefef="+code=sa" class=len  dev, lenhrefe=errout" class="srL1423">14231447        }91354914_dmsgcif"+co     1357  type && 1450      0"_ice_rae = opice_ra;
1357  ame pr>broadcast,cme prhrefllass="line" name="L1423">14239IFLA_VFINFO_LIST]) {91450      e>u_map->u_map->a_get_u8" class="sreseice_present(14231450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"hrefe=errout" class="srL1423">14231357  a>                               NOBUFtb[ifname);9dev, size_t0" cl_u8" class="sre&g_"+co_size && ifname);9142391431broadcast,sk"href="+code=err" class  msgcnew>dev, 1357  ig_efmsgcsize && errout;914sk">broadcast,sk"href=""+code=err" classNUL     return -142391407           u_map-><href=ifname" class="sref">ifname);9ifname);9                broadcast,sk"hrefdcast" class="sreevice_present(broadcast,cme prhref="0="0)e=errout" class="sref">errout;914              if (IFLA_VFINFO_LIST]) {9/* -EMSGSIZE implies BUG in hr_efmsgcsize()e*/IFLA_VFINFO_LIST]) {9ifi_index WARN_ON           if (WARN_ONhrefe" class="sref">a>                ifname);91450     kfree_sk">broadcast,kfree_sk"a_get_u8" class="sresk">broadcast,sk"href)=ifname" class="sref">ifname);91407           u_map-><href=ifname" class="sref">ifname);91447        }914rdev_notif         broadcast,sk"hrefdcast" class="srene>u_map->(RTNLGRP_LINKhrefdcast" class="sreNUL     return -errout;9errout;9           u_map-><href:lass="line" name="L1429">1429914              if (err < 0)9ifi_index _dev_set_sk_              if (_dev_set_sk_   a_get_u8" class="srene>u_map->(RTNLGRP_LINKhrefdcast" class="sre              if (errout;91447        }9142991357    msgcpopulefepfdb_fill>dev, 1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href=lass="line" name="L1429">142991450      0"_ice_rae = opice_ra;
14299->1357  pidsref">dev, pidhref=cast" class="sreuen = 1357  seq>dev, 142991357  type && 1357  flag           if (!flag +codllass="line" name="L1423">14239IFLA_VFINFO_LIST]) {91450       msghdev->errout;91450      dmsg  dev, nd"hrefe=errout" class="sref">errout;91347914n"    u_map-><  msgcpu>a_get_u8" class="sresk">broadcast,sk"hrefdcast" class="srepidsref">dev, pidhref=cast" class="sreseq>dev, 1357  type && dev, nd"href)dcast" class="sreNLM_F_MULTI    return -errout;91359   n"    1423[errout" class="srL1423">142314231431dev, nd"href="+code=err" class  msgcref">dev, errout20<3 href="2020<33" class="liname="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_famil   dev, edm_famil 3" cla"+code=err" classAF_BRIDGEb[errout20<4 href="2020<43" class="liname="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_pad1  dev, edm_pad13" class"+ss="sref">send_addr_notify = 020<5 href="2020<75" class="li_u8" class="srend"sref">dev, nd"href="+code=dev" class="edm_padn = send_addr_notify = 020<6 href="2020<16" class="liref="net/core/rnd"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" clas"+code=err" classflag           if (!flag +cods="sref">send_addr_notify = 020<7 href="2020<57" class="liname="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_type && send_addr_notify = 020<8 href="2020<88" class="liname="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_if"+ifm->(send_addr_notify = 020<9 href="2020<98" class="liname="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm__opee && [send_addr_notify = 0201a href="20t/core/rtnetlink.c#L141020t/c>20t/1" c=errout" class="srL1423">142314="acpu>u_map-><  acpu>a_get_u8" class="sresk">broadcast,sk"hrefdcast" class="sreNDA_LLADDL          if (!NDA_LLADDLhrefdcast" class="sreETH_ALEN           if (ETH_ALENhrefdcast" class="sreaddev->14231407             acpu>_failure && _failure;
send_addr_notify = 02013 href="20t/core/rtnetlink.c#L141320t/c>20t23" class="line" name="L1423">1423dev,   msgcenda_get_u8" class="sresk">broadcast,sk"hrefdcast" class="sren"    errout2015 href="20t/core/rtnetlink.c#L141520t/c>20t75" cifname" class="sref">ifname)20t6 href="20t/core/rtnetlink.c#L141620t/c>20t65" c             acpu>_failure && _failure;
142914n msgccancel>dev, broadcast,sk"hrefdcast" class="sren"    errout2018 href="20t/core/rtnetlink.c#L141820t/c>20t88" class="lireturnia>               MSGSIZEb[errout2019 href="20t/core/rtnetlink.c#L141920t/c>20t69" cne" name="L1447">1447        202a href="20t/core/rtnetlink.c#L142020t/c>20t/5" cifname" class="sref">ifname)2021 href="20t/core/rtnetlink.c#L142120t/c>20t21" c_opeicede=ifm" class="sntlink.a>->1357  size_tsref">dev, size_t0" cl_u8" class="srerdev_fdb_efmsgcsize && 1423IFLA_VFINFO_LIST]) 20t3 href="20t/core/rtnetlink.c#L142320t/c>20t34" class="lireturn+code=err" classNLMSG_ALIGN           if (NLMSG_ALIGNa_get=izeof(="L1450">1450      dmsg  errout2024 href="20t/core/rtnetlink.c#L142420t/c>20t49" cne" name="L1447">1447        2025 href="20t/core/rtnetlink.c#L142520t/c>20t75" cifname" class="sref">ifname)2026 href="20t/core/rtnetlink.c#L142620t/c>20t61" c_opeicevoid name="L1411">14_dev_fdb_eotif         1450      0"_ice_rae = opice_ra;
(u8;
1357  type && 1423IFLA_VFINFO_LIST]) 20t8 href="20t/core/rtnetlink.c#L142820t/c>20t38" class="li="L1450">1450     ne>u_map->u_map->a_get_u8" class="sreseice_present(14231450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"hrefe=errout" class="srL1423">14231357  a>                               NOBUFtb[ifname)20t1 href="20t/core/rtnetlink.c#L143120t/c>20t21" c=errout" class="srL1423">14231431broadcast,sk"href="+code=err" class  msgcnew>dev, 14231359   sk">broadcast,sk"href)=errout" class="srL1423">14231407           u_map-><href=ifname" class="sref">ifname)20t5 href="20t/core/rtnetlink.c#L143520t/c>20t75" cifname" class="sref">ifname)2036 href="20t/core/rtnetlink.c#L143620t/c>20t16" class="liref="net/core/ra>                dev, broadcast,sk"hrefdcast" class="sreevice_present(142314              if (IFLA_VFINFO_LIST]) 20t8 href="20t/core/rtnetlink.c#L143820t/c>20t88" class="line" name3ame="L1437">14kfree_sk">broadcast,kfree_sk"a_get_u8" class="sresk">broadcast,sk"href)=ifname" class="sref">ifname)20t9 href="20t/core/rtnetlink.c#L143920t/c>20t69" class="line" name>1407           u_map-><href=ifname" class="sref">ifname)204a href="20t/core/rtnetlink.c#L144020t/c>20t/9" class="line" name="L1447">1447        2041 href="20t/core/rtnetlink.c#L144120t/c>20t21" c=errout" class="srL1423">14231431broadcast,sk"hrefdcast" class="srene>u_map->->14231423           u_map-><href:lass="line" name="L1429">1429->errout20t6 href="20t/core/rtnetlink.c#L144620t/c>20t69" cne" name="L1447">1447        2047 href="20t/core/rtnetlink.c#L144720t/c>20t47" class="line" name="L1347">13471357  rdev_fdb_add && 1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->1423IFLA_VFINFO_LIST]) 205a href="20t/core/rtnetlink.c#L145020t/c>20t/8" class="li="L1450">1450     ne>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450     ne>_ice_rae = opice_ra;
dev_base_lock1450     ndmsg  dev, nd"hrefe=errout" class="sref">errout20t3 href="20t/core/rtnetlink.c#L135320t/c>20t38" class="li="L1450">1450     n          sref">errout;
nla_get_u32([send_addr_notify = 020t4 href="20t/core/rtnetlink.c#L135420t/c>20t84" class="li="L1450">1450      e>_ice_rae = opice_ra;
send_addr_notify = 020t5 href="20t/core/rtnetlink.c#L135520t/c>20t75" class="li_u8" class="sreu8ce_present(u8;
send_addr_notify = 020t6 href="20t/core/rtnetlink.c#L135620t/c>20t16" class="lin"L1357">1357  a>                send_addr_notify = 020t7 href="20t/core/rtnetlink.c#L135720t/c>20t47" class="line" name="L1347">134714a>                ->dev, nd"href)dcast" class="sref">broadcast, [dev_base_lock14              if (dev_base_lock1431                ifname)20t1 href="20t/core/rtnetlink.c#L136120t/c>20t21" c=errout" class="srL1423">14231431dev, nd"href="+code=err" class  msgcref">dev, errout2063 href="20t/core/rtnetlink.c#L136320t/c>20t33" class="line" name="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_if"+ifm->IFLA_VFINFO_LIST]) 20t4 href="20t/core/rtnetlink.c#L136420t/c>20t84" class="line" namename="L1411">14pr_"+co     "PF_BRIDGE: RTM_NEWNEIGH within"valid if"+ifm\n"errout2065 href="20t/core/rtnetlink.c#L136520t/c>20t15" class="line" namereturnia>               INVA     return -ifname)20t6 href="20t/core/rtnetlink.c#L136620t/c>20t64" class="line" name="L1447">1447        20t7 href="20t/core/rtnetlink.c#L136720t/c>20t47" class="line" name="L1347">134714evice_present(->dev, nd"href="+code=dev" class="edm_if"+ifm->errout2069 href="20t/core/rtnetlink.c#L136920t/c>20t69" class="line" name="L1437">14evice_present(IFLA_VFINFO_LIST]) 207a href="20t/core/rtnetlink.c#L137020t/c>20t/4" class="line" namename="L1411">14pr_"+co     "PF_BRIDGE: RTM_NEWNEIGH withiunknown if"+ifm\n"errout2071 href="20t/core/rtnetlink.c#L137120t/c>20t21" class="line" namereturnia>               NODEVb[ifname)2072 href="20t/core/rtnetlink.c#L137220t/c>20t32" class="line" name="L1447">1447        20t3 href="20t/core/rtnetlink.c#L137320t/c>20t23" class="line" name="L1423">14231359   ">nla_get_u32(dev,   aclena_get_u8" class="sre">nla_get_u32(IFLA_VFINFO_LIST]) 2075 href="20t/core/rtnetlink.c#L137520t/c>20t15" class="line" namename="L1411">14pr_"+co     "PF_BRIDGE: RTM_NEWNEIGH within"valid addeess\n"errout2076 href="20t/core/rtnetlink.c#L137620t/c>20t16" class="line" namereturnia>               INVA     return -ifname)2077 href="20t/core/rtnetlink.c#L137720t/c>20t72" class="line" name="L1447">1447        20t8 href="20t/core/rtnetlink.c#L137820t/c>20t48" class="line" name="L1448">144814addev->1450        oref">dev, nla_get_u32(ifname)208a href="20t/core/rtnetlink.c#L138020t/c>20t/9" class="line" 359">1359   is_valid_ether_addev->IFLA_VFINFO_LIST]) 2081 href="20t/core/rtnetlink.c#L138120t/c>20t21" class="line" namename="L1411">14pr_"+co     "PF_BRIDGE: RTM_NEWNEIGH within"valid ether addeess\n"errout2082 href="20t/core/rtnetlink.c#L138220t/c>20t52" class="line" namereturnia>               INVA     return -ifname)2083 href="20t/core/rtnetlink.c#L138320t/c>20t32" class="line" name="L1447">1447        2084 href="20t/core/rtnetlink.c#L138420t/c>20t54" class="line" name="L1354">1354ifname)2086 href="20t/core/rtnetlink.c#L138620t/c>20t64" class="line" name="L1354">1354/* Support fdb on mastee ice_ra the " nabridge icfault casee*/IFLA_VFINFO_LIST]) 20t8 href="20t/core/rtnetlink.c#L138820t/c>20t89" class="line"  359">1359   nd"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl||"+code=dev" clas d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref"code=err" classNTF_MASTEL          if (!NTF_MASTELhref)a"sref"srefs="sref">IFLA_VFINFO_LIST]) 20t9 href="20t/core/rtnetlink.c#L138920t/c>20t69" class="line"  name="L1437">14evice_present([IFLA_VFINFO_LIST]) 209a href="20t/core/rtnetlink.c#L139020t/c>20t/1" class="line" namename="L1411">14masteev->(IFLA_VFINFO_LIST]) 2091 href="20t/core/rtnetlink.c#L139120t/c>20t21" class="line" namename="L1411">14a>                ->dev, nd"hrefdcast" class="sreevice_present(IFLA_VFINFO_LIST]) 2092 href="20t/core/rtnetlink.c#L139220t/c>20t52" class="line" nameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_u8" class="sre="    errout2093 href="20t/core/rtnetlink.c#L139320t/c>20t33" class="liiiiiiiiine" name="L1437">14              if (dev_base_lock1407           ou>u_map->href=ifname" class="sref">ifname)2095 href="20t/core/rtnetlink.c#L139520t/c>20t15" class="line" nameelseifname" class="sref">ifname)2096 href="20t/core/rtnetlink.c#L139620t/c>20t16" class="line" nameiiiiene"name="L1411">14 d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref= ~code=err" classNTF_MASTEL          if (!NTF_MASTELhref=ifname" class="sref">ifname)2097 href="20t/core/rtnetlink.c#L139720t/c>20t72" class="line" name="L1447">1447        2098 href="20t/core/rtnetlink.c#L139820t/c>20t48" class="line" name="L1448">1448/* Embedded bridge, macvlan, and any other ice_ra support */IFLA_VFINFO_LIST]) 2114nd"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref"code=err" classNTF_SELF           if (NTF_SELFhrefla"sref"sref+code=err" classevice_present(IFLA_VFINFO_LIST]) 21<1 href="2121021" class="line" namename="L1411">14a>                (dev, nd"hrefdcast" class="sreevice_present(IFLA_VFINFO_LIST]) 21<2 href="2121052" class="line" nameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee_u8" class="sre="    errout21<3 href="2121023" class="line" name="L1423">14231359                 if (IFLA_VFINFO_LIST]) 21<5 href="2121015" class="line" nameeeeeeeee_u8" class="sre_dev_fdb_eotif         ->->errout21<6 href="2121016" class="line" nameiiiiene"name="L1411">14 d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref= ~code=err" classNTF_SELF           if (NTF_SELFhrefe=errout" class="sref">errout21<7 href="2121057" class="line" namene" name="L1447">1447        21<8 href="2121<88" class="line" name="L1447">1447        21<9 href="2121<98" c           ou>u_map->href:lass="line" name="L1429">14291431                ifname)2111 href="21t/core/rtnetlink.c#L141121t/c>21t21" cne" name="L1447">1447        21t2 href="21t/core/rtnetlink.c#L141221t/c>21t52" ce" name="L1447">1447        21t3 href="21t/core/rtnetlink.c#L141321t/c>21t23" c_opeice="L1357">1357  rdev_fdb_del>dev, 1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href="="L1450">1450       msghdev->1447        21t4 href="21t/core/rtnetlink.c#L141421t/c>21184" css="sref">IFLA_VFINFO_LIST]) 2115 href="21t/core/rtnetlink.c#L141521t/c>21175" class="li="L1450">1450      e>u_map->u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450      dmsg  dev, nd"hrefe=errout" class="sref">errout2117 href="21t/core/rtnetlink.c#L141721t/c>21147" class="li="L1450">1450                sref">errout;
errolt;
errout2118 href="21t/core/rtnetlink.c#L141821t/c>21138" class="li="L1450">1450     ne>_ice_rae = opice_ra;
send_addr_notify = 02119 href="21t/core/rtnetlink.c#L141921t/c>21189" class="lin"L1357">1357  a>                               INVA     return -ifname)212a href="21t/core/rtnetlink.c#L142021t/c>21280" class="li_u8" class="sre__u8ce_present(__u8;
send_addr_notify = 02121 href="21t/core/rtnetlink.c#L142121t/c>21221" c=errout" class="srL1423">142314="msgclen  dev,   msgclena_get_u8" class="sren"    dev, nd"href))=errout" cl447">1447        21t3 href="21t/core/rtnetlink.c#L142321t/c>21233" class="liiiiiiiiireturnia>               INVA     return -ifname)2124 href="21t/core/rtnetlink.c#L142421t/c>21254" class="line" name="L1354">1354dev, nd"href="+code=err" class  msgcref">dev, errout2126 href="21t/core/rtnetlink.c#L142621t/c>21216" class="line" name="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_if"+ifm->IFLA_VFINFO_LIST]) 2127 href="21t/core/rtnetlink.c#L142721t/c>21257" class="line" name>ifi_index pr_"+co     "PF_BRIDGE: RTM_DELNEIGH within"valid if"+ifm\n"errout21t8 href="21t/core/rtnetlink.c#L142821t/c>21288" class="line" namereturnia>               INVA     return -ifname)2129 href="21t/core/rtnetlink.c#L142921t/c>21269" class="line" name="L1447">1447        213a href="21t/core/rtnetlink.c#L143021t/c>213/5" cifname" class="sref">ifname)21t1 href="21t/core/rtnetlink.c#L143121t/c>21315" class="li_u8" class="sreevice_present(->dev, nd"href="+code=dev" class="edm_if"+ifm->ifname)21t2 href="21t/core/rtnetlink.c#L143221t/c>21352" class="li=e" name="L1411">14evice_present(IFLA_VFINFO_LIST]) 2133 href="21t/core/rtnetlink.c#L143321t/c>21333" class="liiiiiiiii>ifi_index pr_"+co     "PF_BRIDGE: RTM_DELNEIGH withiunknown if"+ifm\n"errout2134 href="21t/core/rtnetlink.c#L143421t/c>21t84" class="line" namereturnia>               NODEVb[ifname)21t5 href="21t/core/rtnetlink.c#L143521t/c>21359" class="line" name="L1447">1447        2136 href="21t/core/rtnetlink.c#L143621t/c>21364" class="line" name="L1354">135414l          sref">errolt;
erroutmsgcf"+i_    a_get_u8" class="sre="    dev, nd"href)dcast" class="sreNDA_LLADDL          if (!NDA_LLADDLhref)e=errout" class="sref">errout2138 href="21t/core/rtnetlink.c#L143821t/c>21389" class="line" name="L1411">14l          sref">errolt;
dev,   aclena_get_u8" class="srel          sref">errolt;
IFLA_VFINFO_LIST]) 21t9 href="21t/core/rtnetlink.c#L143921t/c>21t69" class="line" name>ifi_index pr_"+co     "PF_BRIGDE: RTM_DELNEIGH within"valid addeess\n"errout214a href="21t/core/rtnetlink.c#L144021t/c>214a3" class="liiiiiiiiireturnia>               INVA     return -ifname)2141 href="21t/core/rtnetlink.c#L144121t/c>21419" class="line" name="L1447">1447        2142 href="21t/core/rtnetlink.c#L144221t/c>21452" ce" name="L1447">1447        2143 href="21t/core/rtnetlink.c#L144321t/c>21433" class="liname="L1411">14addev->1450        oref">dev, errolt;
ifname)2144 href="21t/core/rtnetlink.c#L144421t/c>21443" class="liname="L1411">14a>                               OPNOTSUPP    return -ifname)21t5 href="21t/core/rtnetlink.c#L144521t/c>21475" cifname" class="sref">ifname)21t6 href="21t/core/rtnetlink.c#L144621t/c>21416" class="lirspan&&amcomment">/* Support fdb on mastee ice_ra the " nabridge icfault casee*/IFLA_VFINFO_LIST]) 2147 href="21t/core/rtnetlink.c#L144721t/c>21437" class="line"  359">1359   nd"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl||"+code=dev" clas d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref"code=err" classNTF_MASTEL          if (!NTF_MASTELh/ef)a"sref"srefs="sref">IFLA_VFINFO_LIST]) 21t8 href="21t/core/rtnetlink.c#L144821t/c>21488" class="line"  name="L1437">14evice_present([IFLA_VFINFO_LIST]) 2149 href="21t/core/rtnetlink.c#L144921t/c>21469" class="line" name="L1450">1450     ne>_ice_rae = opice_ra;
(IFLA_VFINFO_LIST]) 215a href="21t/core/rtnetlink.c#L145021t/c>215/5" cifname" class="sref">ifname)21t1 href="21t/core/rtnetlink.c#L135121t/c>21521" class="line" namene" name="L1411">14masteev->1447        21t2 href="21t/core/rtnetlink.c#L135221t/c>21552" class="line" nameeeeeeeeename="L1411">14a>                14masteev->dev, nd"hrefdcast" class="sreevice_present(ifname)21t3 href="21t/core/rtnetlink.c#L135321t/c>21523" class="line" name="L1423">142314a>                1447        21t5 href="21t/core/rtnetlink.c#L135521t/c>21515" class="line" nameeeeeeeee>1407           ou>u_map->href=ifname" class="sref">ifname)21t6 href="21t/core/rtnetlink.c#L135621t/c>21516" class="line" nameelseifname" class="sref">ifname)21t7 href="21t/core/rtnetlink.c#L135721t/c>21557" class="line" nameeeeeeeeename="L1411">14 d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref= ~code=err" classNTF_MASTEL          if (!NTF_MASTELhref=ifname" class="sref">ifname)2158 href="21t/core/rtnetlink.c#L135821t/c>21588" class="line" name="L1447">1447        21t9 href="21t/core/rtnetlink.c#L135921t/c>21t69" ce" name="L1447">1447        216a href="21t/core/rtnetlink.c#L136021t/c>21t/9" class="linspan&&amcomment">/* Embedded bridge, macvlan, and any other ice_ra support */IFLA_VFINFO_LIST]) 21t1 href="21t/core/rtnetlink.c#L136121t/c>21621" class="li=e"  name="L1411">14nd"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref"code=err" classNTF_SELF           if (NTF_SELFhrefla"sref"sref+code=err" classevice_present(IFLA_VFINFO_LIST]) 2162 href="21t/core/rtnetlink.c#L136221t/c>21652" class="line" namename="L1411">14a>                14evice_present(dev, nd"hrefdcast" class="sreevice_present(ifname)2163 href="21t/core/rtnetlink.c#L136321t/c>21623" class="line" name="L1423">14231359                 if (IFLA_VFINFO_LIST]) 2165 href="21t/core/rtnetlink.c#L136521t/c>21t15" class="line" namene" namename="L1411">14_dev_fdb_eotif         ->->ifname)2166 href="21t/core/rtnetlink.c#L136621t/c>21616" class="line" nameiiiiene"name="L1411">14 d"sref">dev, nd"href="+code=dev" class="edm_flag           if (!edm_flag 6" cl"sref= ~code=err" classNTF_SELF           if (NTF_SELFhrefe=errout" class="sref">errout21t7 href="21t/core/rtnetlink.c#L136721t/c>21657" class="line" namene" name="L1447">1447        2168 href="21t/core/rtnetlink.c#L136821t/c>21688" class="line" name="L1447">1447        2169 href="21t/core/rtnetlink.c#L136921t/c>21698" c           ou>u_map->href:lass="line" name="L1429">14291431                ifname)2171 href="21t/core/rtnetlink.c#L137121t/c>21721" cne" name="L1447">1447        2172 href="21t/core/rtnetlink.c#L137221t/c>21752" ce" name="L1447">1447        21t3 href="21t/core/rtnetlink.c#L137321t/c>21723" c_opeice="L1357">1357  efmsgcpopulefepfdb     sref">erroutmsgcpopulefepfdba_get="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href=e" name="L1447">1447        21t4 href="21t/core/rtnetlink.c#L137421t/c>21784" class="line" nameeeeeeeeeeeeeee="L1450">1450     ne>    _callbac1     broadcast,c"href=e" name="L1447">1447        21t5 href="21t/core/rtnetlink.c#L137521t/c>21t15" class="line" nameeeeeeeeeeeeeee="L1450">1450     ne>_ice_rae = opice_ra;
1447        21t6 href="21t/core/rtnetlink.c#L137621t/c>21t16" class="line" nameeeeeeeeeeeeeee="L1href="net/core/ridm->1447        21t7 href="21t/core/rtnetlink.c#L137721t/c>21757" class="line" nameeeeeeeeeeeeeee="L1450">1450     ne>iceohw_adde_lis>u_map->;
1447        21t8 href="21t/core/rtnetlink.c#L137821t/c>21t48" css="sref">IFLA_VFINFO_LIST]) 21t9 href="21t/core/rtnetlink.c#L137921t/c>21789" class="li="L1450">1450     seticeohw_addeu_map->dev, ifname)218a href="21t/core/rtnetlink.c#L138021t/c>218/1" class="li="L1357">1357  a>                ifname)2181 href="21t/core/rtnetlink.c#L138121t/c>21815" class="li_u8" class="sreut/core/rtne      u352" clde=dev" class="pid && broadcast,seqhref=ifname" class="sref">ifname)2182 href="21t/core/rtnetlink.c#L138221t/c>21852" ce" name="L1447">1447        2183 href="21t/core/rtnetlink.c#L138321t/c>21833" class="liname="L1411">14pid && broadcast,c"hrefef="+code=sa" class="1">broadcast,sk"href).name="L1411">14pid && ifname)2184 href="21t/core/rtnetlink.c#L138421t/c>21843" class="liname="L1411">14seq>broadcast,seqhref "+code=err" classc">broadcast,c"hrefef="+code=sa" class=="    ifname)2185 href="21t/core/rtnetlink.c#L138521t/c>21875" cifname" class="sref">ifname)2186 href="21t/core/rtnetlink.c#L138621t/c>21816" class="liref="net/core/rlis>_for_each_entr         _for_each_entr a_getast" class="sreh">dev, u_map->;
IFLA_VFINFO_LIST]) 21t7 href="21t/core/rtnetlink.c#L138721t/c>21857" class="line" namene" href="net/core/ridm->broadcast,c"hrefef="+code=sa" class=arg           if (!arg href[0])=errout" cl447">1447        21t8 href="21t/core/rtnetlink.c#L138821t/c>21888" class="line" nameeeeeeeee>1407           skip>broadcast,skiphref=ifname" class="sref">ifname)2189 href="21t/core/rtnetlink.c#L138921t/c>21869" ce" name="L1447">1447        219a href="21t/core/rtnetlink.c#L139021t/c>21t/1" class="line" namename="L1411">14a>                dev, broadcast,sk"hrefdcast" class="sreevice_present(dev, ->IFLA_VFINFO_LIST]) 2191 href="21t/core/rtnetlink.c#L139121t/c>21t21" class="line" nameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeede=dev" class="pid && broadcast,seqhref="0="+code=dev" clasNTF_SELF           if (NTF_SELFhrefle=errout" class="srL1423">142314              if (dev_base_lock1431                ifname)2194 href="21t/core/rtnetlink.c#L139421t/c>21945" c           skip>broadcast,skiphref:lass="line" name="L1429">1429ifname)2196 href="21t/core/rtnetlink.c#L139621t/c>21t16" class="line" name="L1447">1447        2197 href="21t/core/rtnetlink.c#L139721t/c>21t72" class="lireturni0=ifname" class="sref">ifname)2198 href="21t/core/rtnetlink.c#L139821t/c>21t48" cne" name="L1447">1447        2199 href="21t/core/rtnetlink.c#L139921t/c>21969" ce" name="L1447">1447        22/**IFLA_VFINFO_LIST]) 22<1 href="2222021" cnspan&&amcomment"> * edo_dflt_fdb_dump - icfault setice_ra operation 407dump an&FDB table.IFLA_VFINFO_LIST]) 22<2 href="2222052" cnspan&&amcomment"> * @nl : LISTIFLA_VFINFO_LIST]) 22<3 href="2222023" cnspan&&amcomment"> * @ice: setice_ra;
spanfs="sref">IFLA_VFINFO_LIST]) 22<4 href="2222084" cnspan&&amcomment"> *;
spanfs="sref">IFLA_VFINFO_LIST]) 22<5 href="2222015" cnspan&&amcomment"> * Dcfault setice_ra operation 407dump the exis>ing unicast addeess lis>.IFLA_VFINFO_LIST]) 22<6 href="2222016" cnspan&&amcomment"> * Returns zero on success.IFLA_VFINFO_LIST]) 22<7 href="2222057" cnspan&&amcomment"> */IFLA_VFINFO_LIST]) 22<8 href="2222<88" c="L1357">1357  edo_dflt_fdb_dump>dev, 1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href=e" name="L1447">1447        22<9 href="2222069" class="line" nameeeeeee="L1450">1450     ne>    _callbac1     broadcast,c"href=e" name="L1447">1447        221a href="22t/core/rtnetlink.c#L141022t/c>221/1" class="line" nameeeeeee="L1450">1450     ne>_ice_rae = opice_ra;
1447        2211 href="22t/core/rtnetlink.c#L141122t/c>22121" class="line" nameeeeeee="L1357">1357  idm->dev_base_lockIFLA_VFINFO_LIST]) 22t3 href="22t/core/rtnetlink.c#L141322t/c>22133" class="lin"L1357">1357  a>                ifname)22t4 href="22t/core/rtnetlink.c#L141422t/c>22154" class="line" name="L1354">13541423                erroutmsgcpopulefepfdba_get_u8" class="sresk">broadcast,sk"hrefdcast" class="srec">broadcast,c"href=cast" class="sreevice_present(1423dev_base_lock1407           ou>u_map->href=ifname" class="sref">ifname)2219 href="22t/core/rtnetlink.c#L141922t/c>22198" class="liname="L1411">14  msgcpopulefepfdb     sref">erroutmsgcpopulefepfdba_get_u8" class="sresk">broadcast,sk"hrefdcast" class="srec">broadcast,c"href=cast" class="sreevice_present(1423           ou>u_map->href:lass="line" name="L1429">142914231431->14231447        2224 href="22t/core/rtnetlink.c#L142422t/c>22245" c           EXPORT_SYMBO     return -1423ifname)2226 href="22t/core/rtnetlink.c#L142622t/c>22216" c_opeice="L1357">1357  rdev_fdb_dump>dev, 1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href=e="L1450">1450     ne>    _callbac1     broadcast,c"href= class="sref">dev_base_lockIFLA_VFINFO_LIST]) 22t8 href="22t/core/rtnetlink.c#L142822t/c>22288" class="li="L1357">1357  idm->ifname)2229 href="22t/core/rtnetlink.c#L142922t/c>22289" class="li="L1450">1450     set     u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     dev_base_lock1450     set_ice_rae = opice_ra;
dev_base_lock14231357  rcu_read_lunl>dev, dev_base_lock14for_each_setice_rcu>dev, (IFLA_VFINFO_LIST]) 2234 href="22t/core/rtnetlink.c#L143422t/c>22t84" class="line" name=e" name="L1411">14evice_present([IFLA_VFINFO_LIST]) 2235 href="22t/core/rtnetlink.c#L143522t/c>22315" class="line" nameeeeeeeee="L1450">1450     ne>_ice_rae = opice_ra;
(IFLA_VFINFO_LIST]) 2236 href="22t/core/rtnetlink.c#L143622t/c>22316" class="line" nameeeeeeeeeconste="L1450">1450     ne>_ice_raoop           if (!eet_ice_raoop ;
14masteev->IFLA_VFINFO_LIST]) 2237 href="22t/core/rtnetlink.c#L143722t/c>22347" class="line" name="L1347">134714op           if (!op ;
13471357  idm->14op           if (!op ;
broadcast,sk"hrefdcast" class="srec">broadcast,c"href=cast" class="sreevice_present(1357  idm->IFLA_VFINFO_LIST]) 224a href="22t/core/rtnetlink.c#L144022t/c>224a3" class="liiiiiiiiine" name="L1447">1447        2241 href="22t/core/rtnetlink.c#L144122t/c>22421" c=errout" class="srL1423">142314evice_present(13471357  idm->14evice_present(broadcast,sk"hrefdcast" class="srec">broadcast,c"href=cast" class="sreevice_present(1357  idm->IFLA_VFINFO_LIST]) 2244 href="22t/core/rtnetlink.c#L144422t/c>22443" class="line" name="L1447">1447        2245 href="22t/core/rtnetlink.c#L144522t/c>22475" class="li_u8" class="srercu_read_unlunl>dev, dev_base_lock135414c">broadcast,c"hrefef="+code=sa" class=arg           if (!arg href[0]="+name="L1411">14idm->14231431broadcast,sk"hrefef="+code=sa" class=len  dev, lena_gee=errout" class="srL1423">14231447        225a href="22t/core/rtnetlink.c#L145022t/c>225/5" cifname" class="sref">ifname)22t1 href="22t/core/rtnetlink.c#L135122t/c>22521" cnspan&&amcomment">/* Protected by RTNL sempahsre.  */IFLA_VFINFO_LIST]) 22t2 href="22t/core/rtnetlink.c#L135222t/c>22552" c_opeice="L1450">1450     rt         sref">errort    ;
errort _bufa_gee=errout" class="srL1423">14231357  rd    _mam->14231354/* Process one 1354">135 message. */IFLA_VFINFO_LIST]) 22t6 href="22t/core/rtnetlink.c#L135622t/c>22564" class="line" name="L1354">13541357  rdee>    _rcv_msg  1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"href=e="L1450">1450     n msghdev->1347IFLA_VFINFO_LIST]) 22t9 href="22t/core/rtnetlink.c#L135922t/c>22589" class="li="L1450">1450     set     u_map->hrefe" class="sref">sk">broadcast,sk"hrefef="+code=sa" class="1     devNFO_LIST]) 226a href="22t/core/rtnetlink.c#L136022t/c>22680" class="li_u8" class="srerdev_doit_funccore/rtne      rdev_doit_func0" clast" class="sreeoitce_present(14231357  sz_idm->1357  kind && 14231357  minclen  dev, minclena_gee=errout" class="srL1423">14231357  famil         14231357  typae = 14231357  a>                ifname)2266 href="22t/core/rtnetlink.c#L136622t/c>22664" class="line" name="L1354">135414typae = ifname)2268 href="22t/core/rtnetlink.c#L136822t/c>22688" class="line" name="L1437">14typae =  = 1347               OPNOTSUPP    return -ifname)227a href="22t/core/rtnetlink.c#L137022t/c>227/5" cifname" class="sref">ifname)2271 href="22t/core/rtnetlink.c#L137122t/c>22715" class="li_u8" class="sretypae =  = ifname)2272 href="22t/core/rtnetlink.c#L137222t/c>22752" ce" name="L1447">1447        22t3 href="22t/core/rtnetlink.c#L137322t/c>22733" class="linspan&&amcomment">/* All the messages must have at least 1 byte length */IFLA_VFINFO_LIST]) 22t4 href="22t/core/rtnetlink.c#L137422t/c>22784" class="li=e" name="L1411">14="    ->1450     rtgenmsg  1447        22t5 href="22t/core/rtnetlink.c#L137522t/c>22t15" class="line" namereturni0=ifname" class="sref">ifname)22t6 href="22t/core/rtnetlink.c#L137622t/c>22764" class="line" name="L1354">135414famil         1450     rtgenmsg  ->ifname)2278 href="22t/core/rtnetlink.c#L137822t/c>22787" class="liname="L1411">14sz_idm-> = ifname)2279 href="22t/core/rtnetlink.c#L137922t/c>22798" class="liname="L1411">14kind &&  = ifname)228a href="22t/core/rtnetlink.c#L138022t/c>228/5" cifname" class="sref">ifname)2281 href="22t/core/rtnetlink.c#L138122t/c>22821" class="li=e" name="L1411">14kind && 1359   capable>broadcast,capablea_getast" class="sreCAP_NET_ADMIN           if (CAP_NET_ADMINhrefl)ifname" class="sref">ifname)2282 href="22t/core/rtnetlink.c#L138222t/c>22852" class="line" namereturnia>               PERM    return -ifname)2283 href="22t/core/rtnetlink.c#L138322t/c>22823" class="line" name="L1423">142314kind && 14="    IFLA_VFINFO_LIST]) 2285 href="22t/core/rtnetlink.c#L138522t/c>22815" class="line" name="L1450">1450     sunl>dev, ifname)2286 href="22t/core/rtnetlink.c#L138622t/c>22816" class="line" name_u8" class="srerdev_dumpit_funccore/rtne      rdev_dumpit_func0" clast" class="sreeumpitce_present(ifname)2287 href="22t/core/rtnetlink.c#L138722t/c>22857" class="line" name_u8" class="srerdev_calcit_funccore/rtne      rdev_calcit_func0" clast" class="srecalcit>broadcast,calcithref=ifname" class="sref">ifname)2288 href="22t/core/rtnetlink.c#L138822t/c>22888" class="line" nameast" class="sreut/core/rtne      u116" cl357">1357  mincifname)2289 href="22t/core/rtnetlink.c#L138922t/c>22869" ce" name="L1447">1447        229a href="22t/core/rtnetlink.c#L139022t/c>22t/1" class="line" namename="L1411">14eumpitce_present((rdev_de=neumpita_getast" class="srefamil         1357  typae = devNFO_LIST]) 2291 href="22t/core/rtnetlink.c#L139122t/c>22t21" class="line" namene" name="L1437">14eumpitce_present(devNFO_LIST]) 2292 href="22t/core/rtnetlink.c#L139222t/c>22t52" class="line" namene" namereturnia>               OPNOTSUPP    return -ifname)2293 href="22t/core/rtnetlink.c#L139322t/c>22t33" class="liiiiiiiiiast" class="srecalcit>broadcast,calcithref="+code=err" classrdev_de=ncalcit>broadcast,rdev_de=ncalcita_getast" class="srefamil         1357  typae = devNFO_LIST]) 2294 href="22t/core/rtnetlink.c#L139422t/c>22984" class="line" name=e" name="L1411">14calcit>broadcast,calcithrefl class="sref">devNFO_LIST]) 2295 href="22t/core/rtnetlink.c#L139522t/c>22t15" class="line" nameiiiiiiiiast" class="sreminc14calcit>broadcast,calcithreft_u8" class="sresk">broadcast,sk"hrefdcast" class="sre="    errout2296 href="22t/core/rtnetlink.c#L139622t/c>22964" class="line" name="L1354">1354errout2298 href="22t/core/rtnetlink.c#L139822t/c>22988" class="line" nameast" class="srerdevcore/rtne      rdevhref="+code=err" class et     ifname)2299 href="22t/core/rtnetlink.c#L139922t/c>22969" class="line" namess="sref">IFLA_VFINFO_LIST]) 231450     ne>    _dev,     _IFLA_VFINFO_LIST]) 23<1 href="2323021" class="line" nameeeeeeeeeeeeeeeee.name="L1411">14dump>dev, 14eumpitce_present(1447        23<2 href="2323052" class="line" namene" nameeeeeeeee.name="L1411">14minc14minc1447        23<3 href="2323033" class="liiiiiiiiiiiiiiiii}=ifname" class="sref">ifname)23<4 href="2323084" class="line" nameeeeeeeee357">1357  a>                broadcast,sk"hrefdcast" class="sre="    errout23<5 href="2323015" class="line" namene" name="L1447">1447        23<6 href="2323016" class="line" name_u8" class="srerdev_lunl>dev, errout23<7 href="2323057" class="line" namereturni="L1431">1431                ifname)23<8 href="2323088" class="line" name="L1447">1447        23<9 href="2323069" ce" name="L1447">1447        231a href="23t/core/rtnetlink.c#L141023t/c>23180" class="li_u8" class="srememset     errort _bufa_ge="0="t_u8" class="srerd    _mam->1450     rt         sref">errort    ;
errout2311 href="23t/core/rtnetlink.c#L141123t/c>23121" c=errout" class="srL1423">14231357  minclen  dev, minclena_ge="+code=err" classrdm_min     sref">errortm_mina_ge[name="L1411">14sz_idm->errout2313 href="23t/core/rtnetlink.c#L141323t/c>23133" class="line" name="L1411">14="    dev, minclena_gel class="sref">devNFO_LIST]) 23t4 href="23t/core/rtnetlink.c#L141423t/c>23184" class="line" namereturnia>               INVA     return -ifname)2315 href="23t/core/rtnetlink.c#L141523t/c>23175" cifname" class="sref">ifname)23t6 href="23t/core/rtnetlink.c#L141623t/c>23116" class="line" name="L1411">14="    dev, minclena_gel+ss="sref">IFLA_VFINFO_LIST]) 23t7 href="23t/core/rtnetlink.c#L141723t/c>23157" class="line" namen"L1357">1357      len  dev,     lenhref="+code=err" class "    ifname)2318 href="23t/core/rtnetlink.c#L141823t/c>23188" class="line" name="L1450">1450     rt         sref">errort    ;
1357        dev,     a_ge="+(void *)code=err" class "    ifname)2319 href="23t/core/rtnetlink.c#L141923t/c>23169" ce" name="L1447">1447        232a href="23t/core/rtnetlink.c#L142023t/c>232/1" class="line" namewhile" name="L1411">14RTA_OK  dev, RTA_OKhreft_u8" class="sre      dev,     a_ge,eref="net/core/ra   len  dev,     lenhref)lass="sref">IFLA_VFINFO_LIST]) 2321 href="23t/core/rtnetlink.c#L142123t/c>23221" class="line" nameeeeeeeeeunsignedin"L1357">1357  flavo   dev, flavo href="+code=err" class      dev,     a_ge="+code=dev" class="rdactypae = ifname)2322 href="23t/core/rtnetlink.c#L142223t/c>23252" class="line" namene" namene" name="L1411">14flavo   dev, flavo hreflass="sref">IFLA_VFINFO_LIST]) 2323 href="23t/core/rtnetlink.c#L142323t/c>23233" class="liiiiiiiiiiiiiiiiine" namene" name="L1411">14flavo   dev, flavo href="+co"+code=dev" clasrdacmam->14sz_idm->devNFO_LIST]) 2324 href="23t/core/rtnetlink.c#L142423t/c>23284" class="line" nameeeeeeeeeeeeeeeeeeeeeeeeereturnia>               INVA     return -ifname)2325 href="23t/core/rtnetlink.c#L142523t/c>23215" class="line" nameeeeeeeeeeeeeeeme_u8" class="srerd _buf     sref">errort _bufa_ge[name="L1411">14flavo   dev, flavo href-1]="+name="L1411">14      dev,     a_ge=ifname" class="sref">ifname)2326 href="23t/core/rtnetlink.c#L142623t/c>23216" class="line" nameeeeeeeeene" name="L1447">1447        2327 href="23t/core/rtnetlink.c#L142723t/c>23257" class="line" nameeeeeeeeename="L1411">14      dev,     a_ge="+name="L1411">14RTA_NEXTb[dev,     lenhref)=ifname" class="sref">ifname)2328 href="23t/core/rtnetlink.c#L142823t/c>23288" class="line" namene" name="L1447">1447        2329 href="23t/core/rtnetlink.c#L142923t/c>23289" class="line" name="L1447">1447        233a href="23t/core/rtnetlink.c#L143023t/c>233/5" cifname" class="sref">ifname)2331 href="23t/core/rtnetlink.c#L143123t/c>23315" class="li_u8" class="sreeoitce_present((rdev_de=neoita_getast" class="srefamil         1357  typae = devNFO_LIST]) 23t2 href="23t/core/rtnetlink.c#L143223t/c>23352" class="line" name="L1437">14eoitce_present(devNFO_LIST]) 2333 href="23t/core/rtnetlink.c#L143323t/c>23333" class="liiiiiiiiireturnia>               OPNOTSUPP    return -ifname)2334 href="23t/core/rtnetlink.c#L143423t/c>23354" class="line" name="L1354">13541431(broadcast,sk"hrefdcast" class="sre="    errort _bufa_ge[0]k" class="sref">devNFO_LIST]) 23t6 href="23t/core/rtnetlink.c#L143623t/c>23316" cne" name="L1447">1447        2337 href="23t/core/rtnetlink.c#L143723t/c>23347" class="line" name="L1347">1347    _rcvce_present(rdee>    _rcva_get="L1450">1450     sk_bufflink.c#L1434" 5"k_buff;
broadcast,sk"hrefl class="sref">devNFO_LIST]) 2339 href="23t/core/rtnetlink.c#L143923t/c>23t69" css="sref">IFLA_VFINFO_LIST]) 234a href="23t/core/rtnetlink.c#L144023t/c>23480" class="li_u8" class="srerdev_lunl>dev, errout2341 href="23t/core/rtnetlink.c#L144123t/c>23415" class="li_u8" class="srenet    _rcv_sk">broadcast,net    _rcv_sk"a_get_u8" class="sresk">broadcast,sk"hrefdc"srefref="net/core/rrdnet    _rcv_msg  errout2342 href="23t/core/rtnetlink.c#L144223t/c>23452" class="li357">1357  rdev_unlunl>dev, errout2343 href="23t/core/rtnetlink.c#L144323t/c>23433" cne" name="L1447">1447        2344 href="23t/core/rtnetlink.c#L144423t/c>23454" class="line" name="L1354">13541357  rdee>    _event" 1450     notifier_blunl>dev, 1431dev, pt href= class="sref">dev_base_lockIFLA_VFINFO_LIST]) 2347 href="23t/core/rtnetlink.c#L144723t/c>23457" class="li="L1450">1450     set_ice_rae = opice_ra;
dev, pt hrefe=errout" class="sref">errout2348 href="23t/core/rtnetlink.c#L144823t/c>23488" c=errout" class="sref">errout2349 href="23t/core/rtnetlink.c#L144923t/c>23489" class="li=witch" ref="net/core/ravent" IFLA_VFINFO_LIST]) 235a href="23t/core/rtnetlink.c#L145023t/c>23580" class="licase+code=err" classNETDEV_UP    return -142914291429[1429[1429 = 1429 = 14291429[1429->1429 = 14291429errout23t3 href="23t/core/rtnetlink.c#L136323t/c>23633" class="liicfault:lass="line" name="L1429">14291357  rdmsgcifinfo" errout23t5 href="23t/core/rtnetlink.c#L136523t/c>23615" class="line" namebreake=errout" class="sref">errout23t6 href="23t/core/rtnetlink.c#L136623t/c>23616" class="line" name="L1447">1447        23t7 href="23t/core/rtnetlink.c#L136723t/c>23672" class="lireturnicode=err" classNOTIFY_DONEe = errout2368 href="23t/core/rtnetlink.c#L136823t/c>23648" cne" name="L1447">1447        2369 href="23t/core/rtnetlink.c#L136923t/c>23669" ce" name="L1447">1447        237a href="23t/core/rtnetlink.c#L137023t/c>237/5" c_opeice="L1450">1450     notifier_blunl>dev, 1357  rdee>    _iceonotifier" IFLA_VFINFO_LIST]) 2371 href="23t/core/rtnetlink.c#L137123t/c>23715" class="li.name="L1411">14notifier_call>dev,     _event" 1447        2372 href="23t/core/rtnetlink.c#L137223t/c>23752" c}=ifname" class="sref">ifname)23t3 href="23t/core/rtnetlink.c#L137323t/c>23723" class="line" name="L1423">142313541357  _one>_initce_present(_one>_init;
1357  rdee>    _ne>_initce_present(rdee>    _ne>_inita_get="L1450">1450     net     dev_base_lockIFLA_VFINFO_LIST]) 23t7 href="23t/core/rtnetlink.c#L137723t/c>23757" class="li="L1450">1450     sunl>dev, ifname)23t8 href="23t/core/rtnetlink.c#L137823t/c>23787" class="li="L1450">1450     ne>    _kernel_cfg  1357  cfg  IFLA_VFINFO_LIST]) 2379 href="23t/core/rtnetlink.c#L137923t/c>23769" class="line" name.name="L1411">14group           if (!group 9" class="lin"+name="L1411">14RTNLGRP_MAXe = 1447        238a href="23t/core/rtnetlink.c#L138023t/c>238/1" class="line" name.name="L1411">14inpu>u_map->1" class="line"+code=err" classrdee>    _rcvce_present(rdee>    _rcva_ge=e" name="L1447">1447        2381 href="23t/core/rtnetlink.c#L138123t/c>23821" class="line" name.name="L1411">14cb_mutem->1447        2382 href="23t/core/rtnetlink.c#L138223t/c>23852" class="li}=ifname" class="sref">ifname)2383 href="23t/core/rtnetlink.c#L138323t/c>23823" class="line" name="L1423">1423 = o    _kernel_creataa_get_u8" class="sreset     errout2385 href="23t/core/rtnetlink.c#L138523t/c>23815" class="line" 359">1359   "1     errout2386 href="23t/core/rtnetlink.c#L138623t/c>23816" class="line" namereturnia>               NOMEM    return -ifname)2387 href="23t/core/rtnetlink.c#L138723t/c>23857" class="liname="L1411">14set     ifname)2388 href="23t/core/rtnetlink.c#L138823t/c>23888" class="lireturni0=ifname" class="sref">ifname)2389 href="23t/core/rtnetlink.c#L138923t/c>23869" cne" name="L1447">1447        239a href="23t/core/rtnetlink.c#L139023t/c>239/5" cifname" class="sref">ifname)2391 href="23t/core/rtnetlink.c#L139123t/c>23t21" c_opeicevoid code=err" class_one>_exitce_present(_one>_exit;
1357  rdee>    _ne>_exitce_present(rdee>    _ne>_exita_get="L1450">1450     net     dev_base_lockIFLA_VFINFO_LIST]) 2393 href="23t/core/rtnetlink.c#L139323t/c>23t33" class="licode=err" class et    _kernel_releasae = o    _kernel_releasaa_get_u8" class="sreset     errout2394 href="23t/core/rtnetlink.c#L139423t/c>23984" class="liref="net/core/rset     errout2395 href="23t/core/rtnetlink.c#L139523t/c>23t15" cne" name="L1447">1447        2396 href="23t/core/rtnetlink.c#L139623t/c>23964" class="line" name="L1354">13541450     pernet_operpeion           if (!pernet_operpeion ;
1357  rdee>    _ne>_op           if (!rdee>    _ne>_op ;
IFLA_VFINFO_LIST]) 2398 href="23t/core/rtnetlink.c#L139823t/c>23988" class="li.name="L1411">14initce_present(init;
    _ne>_initce_present(rdee>    _ne>_inita_ge=e" name="L1447">1447        2399 href="23t/core/rtnetlink.c#L139923t/c>23969" class="li.name="L1411">14exitce_present(exit;
    _ne>_exitce_present(rdee>    _ne>_exita_ge=e" name="L1447">1447        24ifname)24<1 href="2424021" c=errout" class="srL1423">1423(_oinit;
1357  rdee>    _initce_present(rdee>    _inita_getvoid= class="sref">dev_base_lockIFLA_VFINFO_LIST]) 24<4 href="2424084" class="li="L1357">1357  ice_present(i+code=errout" class="sref">errout24<5 href="2424075" cifname" class="sref">ifname)24<6 href="2424016" class="li357">1357  rd    _mam->ifname)24<7 href="2424057" class="lifor" ref="net/core/rice_present(i+cod "+0=1357">1357  ice_present(i+cod="+codcode=err" classARRAY_SIZEe = 1357  ice_present(i+cod++= class="sref">dev_base_lock14rdacmam->14ice_present(i+cod]="+co"+code=dev" clasrda   _mam->dev_base_lock1357  rd    _mam->14rdacmam->14ice_present(i+cod]=ifname" class="sref">ifname)241a href="24t/core/rtnetlink.c#L141024t/c>24180" class="li_u8" class="srerd _buf     sref">errort _bufa_ge "+name="L1437">14kmalloccore/rtne      kmalloca_get_u8" class="srerda   _mam->1450     rt         sref">errort    ;
errout2411 href="24t/core/rtnetlink.c#L141124t/c>24121" class="li=e" 359">1359   rd _buf     sref">errort _bufa_ge= class="sref">dev_base_lock1450     paniccore/rtne      panica_get_span&&am="Ling">"rdee>    _init: cannot allocate 13 _buf\n"errout2413 href="24t/core/rtnetlink.c#L141324t/c>24123" class="line" name="L1423">142314registee_pernet_subsy           if (!registee_pernet_subsy a_get"srefref="net/core/rrdnet    _ne>_op           if (!rdee>    _ne>_op ;
ifname)2415 href="24t/core/rtnetlink.c#L141524t/c>24115" class="line" name">1450     paniccore/rtne      panica_get_span&&am="Ling">"rdee>    _init: cannot initialize 1354">135\n"errout2416 href="24t/core/rtnetlink.c#L141624t/c>24164" class="line" name="L1354">135414set    _se>_nonroot     errout2418 href="24t/core/rtnetlink.c#L141824t/c>24188" class="liname="L1437">14registee_netice_raonotifier" errout2419 href="24t/core/rtnetlink.c#L141924t/c>24169" ce" name="L1447">1447        242a href="24t/core/rtnetlink.c#L142024t/c>24280" class="li_u8" class="srerdev_registee->1447        2421 href="24t/core/rtnetlink.c#L142124t/c>24221" class="line" nameeeeeeeast" class="srerdev_errout2422 href="24t/core/rtnetlink.c#L142224t/c>24252" class="li357">1357  rdev_registee->errout2423 href="24t/core/rtnetlink.c#L142324t/c>24233" class="licode=err" classrdev_registee->errout2424 href="24t/core/rtnetlink.c#L142424t/c>24284" class="liref="net/core/rrdev_registee->errout2425 href="24t/core/rtnetlink.c#L142524t/c>24275" cifname" class="sref">ifname)2426 href="24t/core/rtnetlink.c#L142624t/c>24216" class="li357">1357  rdev_registee->dev, errout2427 href="24t/core/rtnetlink.c#L142724t/c>24257" class="liname="L1411">14rdev_registee->dev, errout2428 href="24t/core/rtnetlink.c#L142824t/c>24288" c=errout" class="sref">errout2429 href="24t/core/rtnetlink.c#L142924t/c>24298" class="liname="L1411">14rdev_registee->errout243a href="24t/core/rtnetlink.c#L143024t/c>24380" class="li_u8" class="srerdev_registee->errout2431 href="24t/core/rtnetlink.c#L143124t/c>24315" class="li_u8" class="srerdev_registee->dev, errout2432 href="24t/core/rtnetlink.c#L143224t/c>24352" cne" name="L1447">1447        2433 href="24t/core/rtnetlink.c#L143324t/c>24323" class="line" name="L1423">1423


The original LXR software by the ass="linehttp://sourceforge." naprojects/lxe<>LXR communit a_ge,ethi experimental version by ass="linemailto:lxe@tliux.no">lxe@tliux.noa_ge.
lxe.tliux.no kindly hosted by ass="linehttp://www.redpill-tlipro.no">Redpill Llipro ASa_ge,eprovider of Lliux consulting and operpeion sere_ra since 1995.