linux/net/ipv6/anycast.c
<<
>>
Prefs
   1/*
   2 *      Anycast support for IPv6
   3 *      Linux INET6 implementation
   4 *
   5 *      Authors:
   6 *      David L Stevens (dlstevens@us.ibm.com)
   7 *
   8 *      based heavily on net/ipv6/mcast.c
   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
  16#include <linux/capability.h>
  17#include <linux/module.h>
  18#include <linux/errno.h>
  19#include <linux/types.h>
  20#include <linux/random.h>
  21#include <linux/string.h>
  22#include <linux/socket.h>
  23#include <linux/sockios.h>
  24#include <linux/net.h>
  25#include <linux/in6.h>
  26#include <linux/netdevice.h>
  27#include <linux/if_arp.h>
  28#include <linux/route.h>
  29#include <linux/init.h>
  30#include <linux/proc_fs.h>
  31#include <linux/seq_file.h>
  32#include <linux/slab.h>
  33
  34#include <net/net_namespace.h>
  35#include <net/sock.h>
  36#include <net/snmp.h>
  37
  38#include <net/ipv6.h>
  39#include <net/protocol.h>
  40#include <net/if_inet6.h>
  41#include <net/ndisc.h>
  42#include <net/addrconf.h>
  43#include <net/ip6_route.h>
  44
  45#include <net/checksum.h>
  46
  47static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr);
  48
  49/* Big ac list lock for all the sockets */
  50static DEFINE_RWLOCK(ipv6_sk_ac_lock);
  51
  52
  53/*
  54 *      socket join an anycast group
  55 */
  56
  57int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
  58{
  59        struct ipv6_pinfo *np = inet6_sk(sk);
  60        struct net_device *dev = NULL;
  61        struct inet6_dev *idev;
  62        struct ipv6_ac_socklist *pac;
  63        struct net *net = sock_net(sk);
  64        int     ishost = !net->ipv6.devconf_all->forwarding;
  65        int     err = 0;
  66
  67        if (!capable(CAP_NET_ADMIN))
  68                return -EPERM;
  69        if (ipv6_addr_is_multicast(addr))
  70                return -EINVAL;
  71        if (ipv6_chk_addr(net, addr, NULL, 0))
  72                return -EINVAL;
  73
  74        pac = sock_kmalloc(sk, sizeof(struct ipv6_ac_socklist), GFP_KERNEL);
  75        if (pac == NULL)
  76                return -ENOMEM;
  77        pac->acl_next = NULL;
  78        pac->acl_addr = *addr;
  79
  80        rcu_read_lock();
  81        if (ifindex == 0) {
  82                struct rt6_info *rt;
  83
  84                rt = rt6_lookup(net, addr, NULL, 0, 0);
  85                if (rt) {
  86                        dev = rt->dst.dev;
  87                        dst_release(&rt->dst);
  88                } else if (ishost) {
  89                        err = -EADDRNOTAVAIL;
  90                        goto error;
  91                } else {
  92                        /* router, no matching interface: just pick one */
  93                        dev = dev_get_by_flags_rcu(net, IFF_UP,
  94                                                   IFF_UP | IFF_LOOPBACK);
  95                }
  96        } else
  97                dev = dev_get_by_index_rcu(net, ifindex);
  98
  99        if (dev == NULL) {
 100                err = -ENODEV;
 101                goto error;
 102        }
 103
 104        idev = __in6_dev_get(dev);
 105        if (!idev) {
 106                if (ifindex)
 107                        err = -ENODEV;
 108                else
 109                        err = -EADDRNOTAVAIL;
 110                goto error;
 111        }
 112        /* reset ishost, now that we have a specific device */
 113        ishost = !idev->cnf.forwarding;
 114
 115        pac->acl_ifindex = dev->ifindex;
 116
 117        /* XXX
 118         * For hosts, allow link-local or matching prefix anycasts.
 119         * This obviates the need for propagating anycast routes while
 120         * still allowing some non-router anycast participation.
 121         */
 122        if (!ipv6_chk_prefix(addr, dev)) {
 123                if (ishost)
 124                        err = -EADDRNOTAVAIL;
 125                if (err)
 126                        goto error;
 127        }
 128
 129        err = ipv6_dev_ac_inc(dev, addr);
 130        if (!err) {
 131                write_lock_bh(&ipv6_sk_ac_lock);
 132                pac->acl_next = np->ipv6_ac_list;
 133                np->ipv6_ac_list = pac;
 134                write_unlock_bh(&ipv6_sk_ac_lock);
 135                pac = NULL;
 136        }
 137
 138error:
 139        rcu_read_unlock();
 140        if (pac)
 141                sock_kfree_s(sk, pac, sizeof(*pac));
 142        return err;
 143}
 144
 145/*
 146 *      socket leave an anycast group
 147 */
 148int ipv6_sock_ac_drop(struct sock *sk, int ifindex, const struct in6_addr *addr)
 149{
 150        struct ipv6_pinfo *np = inet6_sk(sk);
 151        struct net_device *dev;
 152        struct ipv6_ac_socklist *pac, *prev_pac;
 153        struct net *net = sock_net(sk);
 154
 155        write_lock_bh(&ipv6_sk_ac_lock);
 156        prev_pac = NULL;
 157        for (pac = np->ipv6_ac_list; pac; pac = pac->acl_next) {
 158                if ((ifindex == 0 || pac->acl_ifindex == ifindex) &&
 159                     ipv6_addr_equal(&pac->acl_addr, addr))
 160                        break;
 161                prev_pac = pac;
 162        }
 163        if (!pac) {
 164                write_unlock_bh(&ipv6_sk_ac_lock);
 165                return -ENOENT;
 166        }
 167        if (prev_pac)
 168                prev_pac->acl_next = pac->acl_next;
 169        else
 170                np->ipv6_ac_list = pac->acl_next;
 171
 172        write_unlock_bh(&ipv6_sk_ac_lock);
 173
 174        rcu_read_lock();
 175        dev = dev_get_by_index_rcu(net, pac->acl_ifindex);
 176        if (dev)
 177                ipv6_dev_ac_dec(dev, &pac->acl_addr);
 178        rcu_read_unlock();
 179
 180        sock_kfree_s(sk, pac, sizeof(*pac));
 181        return 0;
 182}
 183
 184void ipv6_sock_ac_close(struct sock *sk)
 185{
 186        struct ipv6_pinfo *np = inet6_sk(sk);
 187        struct net_device *dev = NULL;
 188        struct ipv6_ac_socklist *pac;
 189        struct net *net = sock_net(sk);
 190        int     prev_index;
 191
 192        write_lock_bh(&ipv6_sk_ac_lock);
 193        pac = np->ipv6_ac_list;
 194        np->ipv6_ac_list = NULL;
 195        write_unlock_bh(&ipv6_sk_ac_lock);
 196
 197         197nindex) &&
net, acl_addr 191
        if (dev == <="L12ef="net/ipv6/anycast.c#L141" id="L141" clasass="line" name="L164"> 164 2         2    err = -ipv6_ac_socklist *pac;
->acl_next;
 169 2         2    goto  192 2      }
<2 href="net/ipv6/anycast.2#L10320ref">pac-> == ifindex 164 2 ude <dev = dev_get_by_flags_rcu(net, pac->acl_ifindex);
 176 2      20bh" class="sref">writ"+code=p> 197nindex) &&
acl_ifindex);
 176 2 5      96    2         2    if (ifindex)
 177 2         2            err = -dev, &pac->acl_addr);
 178 2         2    else
(sk, pac, sizeof(*pac));
 181 2         2            err f="+code=np" class="sref">np->-> 181 2         2    goto e="line" name="L96">  96    2      }
<2 href="net/ipv6/anycast.2#L1122 id="L112" claread_unlock();
 179
2      /* res2t ish21" class="line" name="L183"> 183
2       184v2a href="n2t/ipv6/anycast.c#L115" i2="L112" clas>DEFINEef">ipv6_sock_ac_cloaca_punycast.c#L169" id=a_punk *fd=a178la href="net/ipv6/anycss="sref">np-8" class="line" name="L168"> 168 2      p21" class="line" name="L186"> 186 2a href="n2t/ipv6/anycast.c#L117" i2="L1121>dev)
ipv6_sk_ac_lockss="sref">np-8" cladr);
 164 2      /* XXX2/span21ec" class="sref">ipv6_dev_ac_dec(ev)punycast.c#L169" i(ev)punref="+code=pac" classs="sref">np-8" cladr);
cnft/a1f" c" class="line" name="L178"> 178 2pan class2"comment">         * For2hosts21st.c#L109" id="L109" ree_s(rt->np-8" cladr);
);
  88    2pan class2"comment">         * Thi2 obvi21class="sref">err f="+code=np" cl>, np-8" clas="line" name="L88">  88    2pan class2"comment">         * sti2l all22lass="sref">e="line" name="L96">  96    2pan class2"comment">         */
<2 href=="line" name="L96">  96    2p       53  54  54  56
(struct dev,  *dev, const struct in6_addr *addr);
  56
 164 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_socklistfd=a178la href="net/ipv6/anycssaycast.c#L169" id=agt; 181 2      e22ass="sref">ipv6_pinfo *idev;
  62    2      if 2!ipv6_pinfo *rt;
  83
 143}2         2      53__in6_dev_get( 105 2         2     155 2         2    pac == __in6href="net/ipv6/anycast.c#L76" id="L76" class="line" name="L76">  76    2      }
<2 href="net/ipv6/anycast.2#L13723class="sref">ifindex;
  73
 138<2 href="+c2de=error" class="sref">e2rorp;ipv6_sk_ac_lock)" class="sref">cnf. 196
2      ipv6_addr_is_" class="sref">cnf. 164 2      if 2err = -ENODEV;
 101 2         2    sock_kf;
  83
 163 2 184v2a href="n2t/ipv6/anycast.c#L145" i2="L1424bh" class="sra href="+code=np" clssaycast.c#L169" id=agt;(cnf.();
 158 2pan class2"comment">/*
err)
pac->);
))
 158 2p     }
<2"comment"> *      socket2leave24class="sref">dev = );
t/a1userkgt;<++="line" name="L83">  83
 */
);
 178 2p1 2         2    sock_kf;
  88    2pa>
  88    2pan class2"comment">     /anycast.2#L151" id="L151" class="2ine" 25me="L169"> 169 2         2    go/anycast.2#L152" id="L152" class="2ine" 2ame="L152"> 15">  53  53    2p 2     st group<: creatw thnewce: participation.
  54    2p 2    if ( 156        sk, sizeof(struct ), cnf.  73
 156 2a href="n2t/ihref="+code=pac" clssaycasef">dev == NULL) {
 159        if 2err = -ENOMEM;
 160           2    sock_kf;
 111        }
 143}2         2      53rt = __in6_dev_getnet, addr, " class="sref">d/a>"="sref">cnf. 166 2a href="n2t/IS_ERR class="sref">dIS_ERRef">__in6_dev_getNULL) {
 165   an class2"comment">         * Thi2 obvi21class="sref">err ref="+code=pac" clssaycef">cnf. 158 2p     if 2dPTR_ERRef">__in6_dev_getcnf.  83
sock_kf;
 161        }
 179
 180        pac-> *sock_kf;
  96    2      }
 href="+code=pac" class="sref">pac->np1424bh" class="sra href="+code=np" clssaycastss="sref">sock_kf;
 172        pac->npsref">dev = sock_kf;
  53dev = sock_kf;
 174          hangesp 2    if ( 175        dev = sock_kf;
 156        )
)
pac->ss="sref">np-8" , 2"f">cnf. 197        pac->)" c hre_sk_ass="f">cnf. 128
 139        ((cnf128"> 128
 180        (cnast.c#L169" id=agt; 128
  96    2      }
 href="+code=write_unlock_bh" class="sref">write_unlock_bh(&ipv6_sk_ac_lock)" class="sref">cnf. 143}2         2      53__in6_dev_getcnf. 105 2         2     175        (__in6_dev_getdev, &pac->cnf. 196
 197        err ref="+code=pac" clssaycef">cnf. 181        return 0;
error:
 180        write_unlock_bh(&ipv6_sk_ac_lock)" class="sref">cnf.  96    2      }
s="comment">/* XXX2/span21ec" class="sref">ipv6_dev_ac_de href="+code=idev" class="srf">cnf. 192        return err;
 143}
 105 2         2     145/*
 146/*
 147 */
 148int e22ass="sref">ipv6_pinfo *dev, const struct in6_addr *addr);
 149{
 150        struct ipv6_ac_socklistpac, *err;
 169 2         2    g3to  192        write_lock_bh(&ipv6_sk_ac_lock)" class="sref">cnf.  53NULL;
 184v2a href="n2t/ipv6/anycast.c#L145" i2="L1424bh" class="sra href="+code=np" clssaycast.c#L169" id=agt;(cnf.();
 176 2 an class2"comment">/*
err)
pac->);
  96    2                      break;
 177 2 a> 128
 161        }
 196        if (! ref="+code=pac" clssayce=agt;);
-> 164 2      if 2write_unlock_bh(&ipv6_sk_ac_lock)" class="sref">cnf.e="li3e" na3e="L96">  96 192        return -ENOENT;
  83
/* res2t ish21" class="3ine" 31me="L163"> 163dev = );
 164                write_unlock_bh(&ipv6_sk_ac_lock)" class="sref">cnf.np-8" class="3ine" 31me="L165"> 165                return 0;
p21" class="3ine" 3ame="L186"> 18a>
 167        if (cnft/a1f" c" class="3ine" 3ame="L178"> 178 2pan class2"comme hrefcklist(( 169        else
np-8" clas="li3e" na32me="L164"> 164 2      if 2(cnast.c#L169" id=agt;(e="li3e" na32="L96">  96    2      }
 href="+code=write_unlock_bh" class="sref">write_unlock_bh(&ipv6_sk_ac_lock)" class="sref">cnf.      3  */
<2 href=="li3e" na32me="L172"> 172        (ipv6_dev_ac_de href="+code=idev" class="ssref">dev, &pac->cnf. 163 2 194        pac->np-8" cladr);
);
 175        err ref="+code=pac" clssaycsref">pac->npL169" id=a_7>);
 196
 197        err ref="+code=pac" clssaycef">cnf. 181        return 0;
 */
 1">  56
err = -(struct dev,  *dev, const struct in6_addr *addr);
 19v 2      e22ass="sref">ipv6_pinfo *err(  76 2         2    pac == __in6href="net/ipv3/anycast.3#L73" id="L73" class="li3e" na33me="L177"> 177 2 2        return -ENODEV;
 181  > 148int ENODEV;
 */
 146 erface has/this  */
  53 */
  54 */
 1n6_addr *
e    ch"srenet=errhref=v_ac_dec(struct dev,  *dev, const struct in6_addr *addr);
t/a1userkgt;<++="li3e" na34me="L187"> 187        struct e22ass="sref">ipv6_pinfo *idev;
 164 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_socklistfd=a178la href="net/ipv3ii="net/i3#L149" id="L149" class="3ine" 34me="L179"> 179
 180        err(  83 2         2    );
 15180"> 180        (&ipv6_sk_ac_lock)" class="sref">cnf. 164 2 4v2a href="n2t/ipv6/anycast.c#L145" i2="L1424bh" class="sra href="+code=np" clssaycast.c#L169" id=agt;(cnf.pac->(cnf. 176 2      /*
err)
pac->);
 165                                break;
  96    2 0        (&ipv6_sk_ac_lock)" class="sref">cnf. 177 2 2  ass="sr;  == NULL;
 161        }
 152  ass="sr; NULL;
 169 2         2    g3/anycast.3#L162" id="L162" class="3ine" 36="L83146"> 146 */
  53 erface ( */
  54 */
(struct devipv6_ac_so ho class="sref">dev        struct net_device * */
 158 2ppppppppppef">dev, const struct in6_addr *addr);
  56
 138<2 href="+boo2ef="n24s="sref"boo2e="L156
NULL;
 179
 180        , acl_addr 191
  83 2         2   href="+code=i2index2 class="sref">ifindex)
 15180"> 180        e    ch"srenet=errhref=_device *ENODEV;
  53        else
 164                 *dev 2         2   href="+code=i2index2 class="sref">ifindex)
 165           an class2"comment">/*e    ch"srenet=errhref=_device * 158 2pppppppppp80"> 180        " class="sref">d/a>"="srf">ENODEV;
  83
 178 2p1 2 1        }
 139        ();
 182  ass="sr; ();
  96    2pan class2"comme3/anycast.3#L182" id="L182" class="3ine" 38me="L143"> 143}2         2    <3/anycast.3#L183" id="L183" class="3ine" 38me="L163"> 163 2;  163 2dac6_i er_184""e="L1agt;);
 1518/a>, const struct dseqs="s_priv4""e="L156
();
 187        struct net_device * 164 2a href="n2t/ipv6code=err" class="s2ef">e22ass="sref">ipv6_pinfo *idev;
idev;
dac6_seqspriv4""href=_device *dseqlasse====(=v_ac_dec(struct dac6_i er_184""e="L1*)=_device *dseqlassek" class="sref">ipv6priv4"" class="sref">dpriv4""hrefss="sref">ifindex)
 143}2         2    <3/anycast.3#L193" id="L193" class="3ine" 39me="L184"> 1n6_addr *e2L193e="L14 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_sock6ss="sfiret((struct dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlasse143"> 143}2         2    <3/anycast.3#L194" id="L194" class="3ine" 39me="Lagt;);
 164 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_soim.c#L129" i2="L12msaycast.c#L169" id=agt href="+code=NULL" class="sref">NULL;
 1518/a>, const struct dac6_i er_184""e="L1*ref">ipv6_ac_sos84"" class="sref">d184""e="L1st.c#L169" id=agt;<6_seqspriv4"" class="sref">dac6_seqspriv4""href=_device *dseqlasseref">NULL;
 187        struct devipv6_ac_so ho class="sref">devdseqsfil"_ hohref=_device *dseqlasseref">NULL;
 128
 139        d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastast.c#L169" id=agt href="+code=NULL" class="sref">NULL;
 180         *dev 2         2  s84"" class="sref">d184""e="Lk" class="sref">ipv6 href="+code=i2index2 clas1agt;);
  96 194 2a href="n2t/ipv6code=err" class="s2ef">e22ass="sref">ipv6_pinfo *idev;
 15180"> 180        errd184""e="Lk" class="sref">ipv6 href="+code=i2index2 clasref">idev;
 164 2 6        if (!idev;
 176 2      idev;
 176 2 0        (&ipv6_sk_ac_lock)" class="sref">cnf.  96    2 ref">ipv6_ac_soim.c#L129" i2="L12msaycast.c#L169" id=agt href="+code=np" clssaycast.c#L169" id=agt;(cnf128"> 128
 177 2 an class2"comment">/m.c#L129" i2="L12msaycs1agt;);
 178 2p1 2 9        d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastast.c#L169" id=agtidev;
 159                        break;
-> 164 2 ">  96    2pan class2"comme4f="+code=4rror"2class="sref">e="li4e" na4e="L96">  96 190        (&ipv6_sk_ac_lock)" class="sref">cnf.  83
/* res2t ish21" class="4ine" 41me="L163"> 162  ass="sr; cnf.np-8" class="4ine" 41me="L(p21" class="4ine" 4ame="L184"> 14 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_sock6ss="sv_get(dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,87        struct ipv6_ac_soim.c#L129" i2="L12msayceef">idev;
  56
cnft/a1f" c" class="4ine" 41me="L164"> 164 2a href="n2t/ipvac6_i er_184"" class="sref">dac6_i er_184""e="L1*ref">ipv6_ac_sos84"" class="sref">d184""e="L1st.c#L169" id=agt;<6_seqspriv4"" class="sref">dac6_seqspriv4""href=_device *dseqlasseref">NULL;
 179
np-8" clas="li4e" na42me="L180"> 180        (e="li4e" na42="L96">  96        if (!      4  */
<2 href=="li4e" na42me="L152"> 15180"> 18an class2"comment">likelyac_lock)" clikely" clas="sref">errd184""e="Lk" class="sref">ipv6 href="+code=np" clssaycasta_ifindex ==  164 2 192"> 190        (&d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastk" class="sref">ipv6_sk_ac_lock)" class="sref">cnf. 105 2         2    <44 inc (a14 hrenot found) class="li4e" na42me="L176"> 176 2 0        d184""e="Lk" class="sref">ipv6 href="+code=i2index2 claast.c#L169" id=agt#L16_class="sreoget_by_flags_rcu" #L16_class="sreoget" clas="sref">errd184""e="Lk" class="sref">ipv6 href="+code=i2index2 clasref">idev;
  96    2 6        if (!d184""e="Lk" class="sref">ipv6 href="+code=i2index2 clas1agt;);
  83
 */d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastast.c#L169" id=agt href="+code=NULL" class="sref">NULL;
 178 2p1 2              break;
  88    2pa>
 164 2      if 2d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastast.c#L169" id=agt__ref="+code=np" cl6_dev_get__ref="+code=" clas="sref">errd184""e="Lk" class="sref">ipv6 href="+code=i2index2 clasref">idev;
  96 196        if (!d184""e="Lk" class="sref">ipv6  idev;
 15180"> 1888888888continueref">idev;
 164 2 0        (&d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastk" class="sref">ipv6_sk_ac_lock)" class="sref">cnf. 164                d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastk" class="sref">ipv6dev_get(cnf128"> 128
 17a>
  76  ass="sr; cnf. 128
 14 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_sock6ss="sidxt(dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,8ass="sref">ipv6_sff_t(ipv6pode=rt" clssaycaspodlasseef">idev;
  96 2a href="n2t/ipv6/anycast.c#L129" i2="L1222st" class="sref">ipv6_ac_soim.c#L129" i2="L12msaycast.c#L169" id=agtck6ss="sfiret( *dseqlasseref">NULL;
 15an class2"comment">/m.c#L129" i2="L12msaycsef">NULL;
 164 2 whil"/aass="sref">ipv6pode=rt" clssaycaspodlassref">def">d class2"comment">/m.c#L129" i2="L12msaycast.c#L169" id=agtck6ss="sv_get(ipv6_ac_soseq class="sref">dseqlass,8ass="sref">ipv6/m.c#L129" i2="L12msaycs)a_ifindex == NULL;
 176 2      NULL;
  76  ass="sr;  == ; cnf.t/a1userkgt;<++="li4e" na44me="L>
 1void"sref">ipv6_ac_sock6sseqs184f="+code=dst" css="6sseqs184f=href=v_ac_dec(struct dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,8ass="sref">ipv6_sff_t(ipv6_ac_sopode=rt" clssaycaspodlasseef">idev;
 139        ipv6_ac_soRCUe=rt" clssaycasRCUlasseef">idev;
  83        , acl_addr 191
 152  ass="sr; ipv6_ac_soseq class="sref">dseqlass,8sref">ipv6_ac_sopode=rt" clssaycaspodlassee" name="L191"> 191
 143}
 105 2         2    <4/anycast.4#L155" id="L155" class="4ine" 455e="L184"> 1void"sref">ipv6_ac_sock6sseqsv_get((struct dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,8void"sref">ipv6_ac_soef="+code=np" class="srn6_addr *(ipv6_ac_sopode=rt" clssaycaspodlasseef">idev;
 187        struct ipv6_ac_soim.c#L129" i2="L12msaycast.c#L169" id=agtck6ss="sv_get(ipv6_ac_soseq class="sref">dseqlass,8ass="sref">ipv6ef="+code=np" class="ee" name="L191"> 191
 128
 15++sref">ipv6_ac_sopode=rt" clssaycaspodlasse" name="L191"> 191
 182  ass="sr; cnf.  96    2pan class2"comme4/anycast.4#L162" id="L162" class="4ine" 46me="L143"> 143}2         2    <4/anycast.4#L163" id="L163" class="4ine" 463e="L184"> 1void"ref">ipv6_ac_sock6sseqs18ope=rt" clssaycasck6sseqs18ophref=v_ac_dec(struct dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,8void"sref">ipv6_ac_soef="+code=np" class="eef">idev;
 194        ipv6_ac_soRCUe=rt" clssaycasRCUlasseef">idev;
 154 2a href="n2t/ipvac6_i er_184"" class="sref">dac6_i er_184""e="L1*ref">ipv6_ac_sos84"" class="sref">d184""e="L1st.c#L169" id=agt;<6_seqspriv4"" class="sref">dac6_seqspriv4""href=_device *dseqlasseref">NULL;
 13an class2"comment">likelyac_lock)" clikely" clas="sref">errd184""e="Lk" class="sref">ipv6 href="+code=np" clssaycasta_ifindex ==   88    2p0        (&d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastk" class="sref">ipv6_sk_ac_lock)" class="sref">cnf. 164 2      if 2d184""e="Lk" class="sref">ipv6 href="+code=np" clssaycastast.c#L169" id=agt href="+code=NULL" class="sref">NULL;
  83  96    2pan class2"comme4/anycast.4#L172" id="L172" class="4ine" 47me="L172"> 172        ();
 143}
 105 2         2    <4/anycast.4#L175" id="L175" class="4ine" 475e="L184"> 1">  56
(struct dseqsfil"ass="sref">ipv6_ac_soseq class="sref">dseqlass,8void"sref">ipv6_ac_soef="+code=np" class="eef">idev;
 187        struct ipv6_ac_soim.c#L129" i2="L12msaycastev 2      ipv6_ac_soef="+code=np" class="_unlock();
 164 2a href="n2t/ipvac6_i er_184"" class="sref">dac6_i er_184""e="L1*ref">ipv6_ac_sos84"" class="sref">d184""e="L1st.c#L169" id=agt;<6_seqspriv4"" class="sref">dac6_seqspriv4""href=_device *dseqlasseref">NULL;
 179
 180        dseqsprintfhref=ref">ipv6_ac_soseq class="sref">dseqlass,8a>  54"%-4d %-15s %pi6 %5d\n""commen,t"> */
  96 19 2      if 2d184""e="Lk" class="sref">ipv6 href="+code=i2index2 clak" class="sref">ipv6 findext(ipv6s84"" class="sref">d184""e="Lk" class="sref">ipv6 href="+code=i2index2 clak" class="sref">ipv6clasef="+code=i2indclaslass,t"> */
 15180"> 18888nlock_bh(&);
< m.c#L129" i2="L12msaycst.c#L169" id=agt;NULL;
 162        return 0;
 1ef">dev, const struct f"> class="sref">dseqsoper4">f">e="L1.c#L169" id=agt;<6_seqsopde=rt" clssaycast.6_seqsopde="L1stagt;);
 18.ass="sref">ipv6s84f="+code=dst" css184f=href 1st 19 2      if 2 */
 16.ass="sref">ipv6v_get(( */
 18.ass="sref">ipv6s8ope=rt" clssaycas18ophref1 1st 19 2      if 2 */
 18.ass="sref">ipv6showe=rt" clssaycas1howhref1 1st 19 2      if 2 */
idev;
 143}2         2    <4/anycast.4#L193" id="L193" class="4ine" 49me="L184"> 1">  56
(struct ipv6_ac_soint <.c#L129" i2="L12nt         struct dfil"ass="sref">ipv6_ac_sofil" class="sref">dfil"ass=eef">idev;
  76  ass="sr; dseqsopen_ hohref=ref">ipv6_ac_soint <.c#L129" i2="L12nt ipv6_ac_sofil" class="sref">dfil"ass=sref">dev, & */
  96    2             sizeof=v_ac_dec(struct dac6_i er_184""e="L)eref">NULL;
 128
 1ef">dev, const struct f"> class="sref">dfil"_oper4">f">e="L1.c#L169" id=agt;<6_seqsfopde=rt" clssaycast.6_seqsfopde="L1stagt;);
 18.ass="sref">ipv6owne+code=acl_ssaycaowne+"L96">  96st 19 2      if 2 */
  96ipv6opene=rt" clssaycasopenhref ">  96st 19 2      if 2 */
 15.ass="sref">ipv6id="ite_unlock_bh" a91"href ">  96st 19 2      if 2 */
 16.ass="sref">ipv6llsee_ac_lock)" cllsee_href ">  96)" cseqslsee_href,t"> */
 17.ass="sref">ipv6idleaseite_unlock_bh" a9leasee="L176"> 17st 19 2      if 2dseqsidlease_ hohref,t"> */
idev;
 196
  56
(struct devipv6_ac_so ho class="sref">devidev;
 156        if (!dprocsclasfopd_cid=""href=ref">ipv6_ac_so ho class="sref">dev>  54"f="net/6""commen,ec(struct dS_IRUGOass=sref">dev, &-> 164 2 2        return -e="li5e" na51me="L169"> 169 2         2    g5/anycast.5#L179" id="L179" class="5ine" 51me="L152"> 152        return 0;
/* res2t ish21" class="5ine" 51me="L143"> 143}
 105 2         2    <5=5 np-8" class="5ine" 51me="Lvoid"ref">ipv6_ac_sock6sprocsexi=np" cl6_dev_get;<6_procsexi=href=v_ac_dec(struct devipv6_ac_so ho class="sref">devidev;
p21" class="5ine" 51me="Lagt;);
 18        if (!dprocsclasremov"href=ref">ipv6_ac_so ho class="sref">dev>  54"f="net/6""commeneref">NULL;
cnft/a1f" c" class="5ine" 51me="L143"> 143}
 143}
np-8" clas="li5e" na52="L62>
e="li5e" na52="L96


The original LXR software by/the1 LXR a2 uni=yass=,8this experi al vers>f" by/ lxr.="sux.no kindly hosted by/ ulting and oper4">f"> ser"sre> since 1995.