linux/net/netfilter/nf_conntrack_broadcast.c
<<
/opt2.6/spalue 2.6/formue 2.6a /opt2. href="../linux+v3 9/net/netfilter/nf_conntrack_broadcast.c">/opt2.6img src="../.static/gfx/right.png" alt=">>">/o6/spalue/o6spal class="lxr_search">/opt/opt2.6input typ hidden" nam navtarget" > ">/opt2.6input typ text" nam search" id search">/opt2.6butt5" typ submit">Search/opt2.Prefse 2.6/a>/o6/spaluept2. .6/divuept2. .6form ac val="ajax+*" method="post" onsubmit="return false;">/o6input typ hidden" nam ajax_lookup" id ajax_lookup" > ">/pt2. .6/formue/pt2. .6div class="headingbott5m">e 6div id file_contents"u
. .16/a>6spal class="comment">/*6/spalue. .26/a>6spal class="comment"> *pt2. .broadcast connec val tracking helper6/spalue. .36/a>6spal class="comment"> *6/spalue. .46/a>6spal class="comment"> *pt2. .(c) 2005 Patrick McHardy <kaber@trash.net>6/spalue. .56/a>6spal class="comment"> *6/spalue. .66/a>6spal class="comment"> *pt2. .This program is free software; you cal redistribute it and/or6/spalue. .76/a>6spal class="comment"> *pt2. .modify it under the terms of the GNU General Public License6/spalue. .86/a>6spal class="comment"> *pt2. .as published by the Free Software Founda val; either versval6/spalue. .96/a>6spal class="comment"> *pt2. .2 of the License, or (at your on val) any later versval.6/spalue. aluea>6spal class="comment"> */6/spalue. 116/a>e. 126/a>#include <linux/module.h6/a>>e. 136/a>#include <linux/ip.h6/a>>e. 146/a>#include <net/route.h6/a>>e. 156/a>#include <linux/inetdevice.h6/a>>e. 166/a>#include <linux/skbuff.h6/a>>e. 176/a>e. 186/a>#include <net/netfilter/nf_conntrack.h6/a>>e. 196/a>#include <net/netfilter/nf_conntrack_helper.h6/a>>e. 206/a>#include <net/netfilter/nf_conntrack_expec .h6/a>>e. 216/a>e. 226/a>int.6a href="+code=nf_conntrack_broadcast_help" class="sref">nf_conntrack_broadcast_help6/a>(struct.6a href="+code=sk_buff" class="sref">sk_buff6/a> *6a href="+code=skb" class="sref">skb6/a>,e. 236/a>                                unsigned int.6a href="+code=protoff" class="sref">protoff6/a>,e. 246/a>                                struct.6a href="+code=nf_conn" class="sref">nf_conn6/a> *6a href="+code=ct" class="sref">ct6/a>,e. 256/a>                                enum.6a href="+code=ip_conntrack_info" class="sref">ip_conntrack_info6/a> 6a href="+code=ctinfo" class="sref">ctinfo6/a>,e. 266/a>                                unsigned int.6a href="+code=timeout" class="sref">timeout6/a>)e. 276/a>{e. 286/a>        struct.6a href="+code=nf_conntrack_expec " class="sref">nf_conntrack_expec 6/a> *6a href="+code=exp" class="sref">exp6/a>;e. 296/a>        struct.6a href="+code=iphdr" class="sref">iphdr6/a> *6a href="+code=iph" class="sref">iph6/a> =.6a href="+code=ip_hdr" class="sref">ip_hdr6/a>(6a href="+code=skb" class="sref">skb6/a>);e. 306/a>        struct.6a href="+code=rtable" class="sref">rtable6/a> *6a href="+code=r " class="sref">rt6/a> =.6a href="+code=skb_rtable" class="sref">skb_rtable6/a>(6a href="+code=skb" class="sref">skb6/a>);e. 316/a>        struct.6a href="+code=in_device" class="sref">in_device6/a> *6a href="+code=in_dev" class="sref">in_dev6/a>;e. 326/a>        struct.6a href="+code=nf_conn_help" class="sref">nf_conn_help6/a> *6a href="+code=help" class="sref">help6/a> =.6a href="+code=nfct_help" class="sref">nfct_help6/a>(6a href="+code=ct" class="sref">ct6/a>);e. 336/a>        6a href="+code=__be32" class="sref">__be326/a> 6a href="+code=mask" class="sref">mask6/a> =.0;e. 346/a>e. 356/a>        6spal class="comment">/* we're only interested in locally generated packets */6/spalue. 366/a>        if (6a href="+code=skb" class="sref">skb6/a>->6a href="+code=sk" class="sref">sk6/a> ==.6a href="+code=NULL" class="sref">NULL6/a>)e. 376/a>                goto.6a href="+code=out" class="sref">out6/a>;e. 386/a>        if (6a href="+code=r " class="sref">rt6/a> ==.6a href="+code=NULL" class="sref">NULL6/a> || !(6a href="+code=r " class="sref">rt6/a>->6a href="+code=rt_flags" class="sref">rt_flags6/a> &.6a href="+code=RTCF_BROADCAST" class="sref">RTCF_BROADCAST6/a>))e. 396/a>                goto.6a href="+code=out" class="sref">out6/a>;e. 406/a>        if (6a href="+code=CTINFO2DIR" class="sref">CTINFO2DIR6/a>(6a href="+code=ctinfo" class="sref">ctinfo6/a>) !=.6a href="+code=IP_CT_DIR_ORIGINAL" class="sref">IP_CT_DIR_ORIGINAL6/a>)e. 416/a>                goto.6a href="+code=out" class="sref">out6/a>;e. 426/a>e. 436/a>        6a href="+code=rcu_read_lock" class="sref">rcu_read_lock6/a>();e. 446/a>        6a href="+code=in_dev" class="sref">in_dev6/a> =.6a href="+code=__in_dev_get_rcu" class="sref">__in_dev_get_rcu6/a>(6a href="+code=r " class="sref">rt6/a>->6a href="+code=ds " class="sref">ds 6/a>.6a href="+code=dev" class="sref">dev6/a>);e. 456/a>        if (6a href="+code=in_dev" class="sref">in_dev6/a> !=.6a href="+code=NULL" class="sref">NULL6/a>) {e. 466/a>                6a href="+code=for_primary_ifa" class="sref">for_primary_ifa6/a>(6a href="+code=in_dev" class="sref">in_dev6/a>) {e. 476/a>                        if (6a href="+code=ifa" class="sref">ifa6/a>->6a href="+code=ifa_broadcast" class="sref">ifa_broadcast6/a> ==.6a href="+code=iph" class="sref">iph6/a>->6a href="+code=daddr" class="sref">daddr6/a>) {e. 486/a>                                6a href="+code=mask" class="sref">mask6/a> =.6a href="+code=ifa" class="sref">ifa6/a>->6a href="+code=ifa_mask" class="sref">ifa_mask6/a>;e. 496/a>                                break;e. 506/a>                        }e. 516/a>                }.6a href="+code=endfor_ifa" class="sref">endfor_ifa6/a>(6a href="+code=in_dev" class="sref">in_dev6/a>);e. 526/a>        }e. 536/a>        6a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock6/a>();e. 546/a>e. 556/a>        if (6a href="+code=mask" class="sref">mask6/a> == 0)e. 566/a>                goto.6a href="+code=out" class="sref">out6/a>;e. 576/a>e. 586/a>        6a href="+code=exp" class="sref">exp6/a> =.6a href="+code=nf_ct_expec _alloc" class="sref">nf_ct_expec _alloc6/a>(6a href="+code=ct" class="sref">ct6/a>);e. 596/a>        if (6a href="+code=exp" class="sref">exp6/a> ==.6a href="+code=NULL" class="sref">NULL6/a>)e. 606/a>                goto.6a href="+code=out" class="sref">out6/a>;e. 616/a>e. 626/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=tuple" class="sref">tuple6/a>                =.6a href="+code=ct" class="sref">ct6/a>->6a href="+code=tuplehash" class="sref">tuplehash6/a>[6a href="+code=IP_CT_DIR_REPLY" class="sref">IP_CT_DIR_REPLY6/a>].6a href="+code=tuple" class="sref">tuple6/a>;e. 636/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=tuple" class="sref">tuple6/a>.6a href="+code=src" class="sref">src6/a>.6a href="+code=u" class="sref">u6/a>.6a href="+code=udp" class="sref">udp6/a>.6a href="+code=por " class="sref">por 6/a> =.6a href="+code=help" class="sref">help6/a>->6a href="+code=helper" class="sref">helper6/a>->6a href="+code=tuple" class="sref">tuple6/a>.6a href="+code=src" class="sref">src6/a>.6a href="+code=u" class="sref">u6/a>.6a href="+code=udp" class="sref">udp6/a>.6a href="+code=por " class="sref">por 6/a>;e. 646/a>e. 656/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=mask" class="sref">mask6/a>.6a href="+code=src" class="sref">src6/a>.6a href="+code=u3" class="sref">u36/a>.6a href="+code=ip" class="sref">ip6/a>       =.6a href="+code=mask" class="sref">mask6/a>;e. 666/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=mask" class="sref">mask6/a>.6a href="+code=src" class="sref">src6/a>.6a href="+code=u" class="sref">u6/a>.6a href="+code=udp" class="sref">udp6/a>.6a href="+code=por " class="sref">por 6/a>  =.6a href="+code=htons" class="sref">htons6/a>(0xFFFF);e. 676/a>e. 686/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=expec fn" class="sref">expec fn6/a>             =.6a href="+code=NULL" class="sref">NULL6/a>;e. 696/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=flags" class="sref">flags6/a>                =.6a href="+code=NF_CT_EXPECT_PERMANENT" class="sref">NF_CT_EXPECT_PERMANENT6/a>;e. 706/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=class" class="sref">class6/a>                =.6a href="+code=NF_CT_EXPECT_CLASS_DEFAULT" class="sref">NF_CT_EXPECT_CLASS_DEFAULT6/a>;e. 716/a>        6a href="+code=exp" class="sref">exp6/a>->6a href="+code=helper" class="sref">helper6/a>               =.6a href="+code=NULL" class="sref">NULL6/a>;e. 726/a>e. 736/a>        6a href="+code=nf_ct_expec _related" class="sref">nf_ct_expec _related6/a>(6a href="+code=exp" class="sref">exp6/a>);e. 746/a>        6a href="+code=nf_ct_expec _put" class="sref">nf_ct_expec _put6/a>(6a href="+code=exp" class="sref">exp6/a>);e. 756/a>e. 766/a>        6a href="+code=nf_ct_refresh" class="sref">nf_ct_refresh6/a>(6a href="+code=ct" class="sref">ct6/a>,.6a href="+code=skb" class="sref">skb6/a>,.6a href="+code=timeout" class="sref">timeout6/a> *.6a href="+code=HZ" class="sref">HZ6/a>);e. 776/a>6a href="+code=out" class="sref">out6/a>:e. 786/a>        return 6a href="+code=NF_ACCEPT" class="sref">NF_ACCEPT6/a>;e. 796/a>}e. 806/a>6a href="+code=EXPORT_SYMBOL_GPL" class="sref">EXPORT_SYMBOL_GPL6/a>(6a href="+code=nf_conntrack_broadcast_help" class="sref">nf_conntrack_broadcast_help6/a>);e. 816/a>e. 826/a>6a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE6/a>(6spal class="string">"GPL"6/spalu);e. 836/a>6/pre>
The original LXR software by the LXR community6/a>,.this experimental versval by lxr@linux.no6/a>.
6/divue6div class="subfooter">
lxr.linux.no kindly hosted by Redpill Linpro AS6/a>,.provider of Linux consulting and operatvals services since 1995.
6/divue
6/bodyue6/htmlue