linux/net/netfilter/xt_ecn.c
<<
>>
Prefs
   1/*
   2 * Xtables module for matching the value of the IPv4/IPv6 and TCP ECN bits
   3 *
   4 * (C) 2002 by Harald Welte <laforge@gnumonks.org>
   5 * (C) 2011 Patrick McHardy <kaber@trash.net>
   6 *

  v2.6.21.5
  
  tion value="v2.6.14.3"
	  >
  v2.6>
  

e itcn.c/its
  
  

  v286.21.5
  
  t8on va8ue="v2.6.14.3"
	  >
  v2.6>
 itcundernetfiionmset/netfiGNU Geneef= Pubpan Licenshreersect>2 a class="line" name="L3">   3
  v296.21.5
  
  t9on va9ue="v2.6.14.3"
	  >
  v2.6>
 pubpashed

	<.class="line" name="L3">   3/*

  v2.6>
/class="line" name="L3">   3/*

lic">pr_fmtfilt( onclick="code=fmtcontent">
lic">fmtfilt)  onclick="code=KBUILD_MODNAMEcontent">
lic">KBUILD_MODNAMEfilt v2.6.14.3"
	 s="nsea>": "class="  onclick="code=fmtcontent">
lic">fmtfiltline" name="L3">   3 * Xtables module f1or ma1ching#i/spudetfiltine" namei/spudec="..//in.ht"> * Xtaflic">="..//in.hhingL6" line" name="L3">   3 *
 * Xtaflic">="..//ip.hhingL6" line" name="L3">   3 * (C) 2002 by Hara1ld We14hing#i/spudetfiltine" namei/spudec="L3ip.ht"> * Xtaflic">="L3ip.hhingL6" line" name="L3">   3 * (C) 2011 Patrick1 McHa15hing#i/spudetfiltine" namei/spudec="..//CP ECN.ht"> * Xtaflic">="..//CP ECN.hhingL6" line" name="L3">   3 *
 * Xtaflic">="..//skbuff.hhingL6" line" name="L3">   3
  v21.6.21.5
  
  t1ion v17hing#i/spudetfiltine" namei/spudec="..//tcp.ht"> * Xtaflic">="..//tcp.hhingL6" line" name="L3">   3
  v2186.21.5
  
  t18on v18filtline" name="L3">   3
  v2196.21.5
  
  t19on v19hing#i/spudetfiltine" namei/spudec="..//">   3<_6 and .ht"> * Xtaflic">="..//">   3<_6 and .hhingL6" line" name="L3">   3/*
   3 * Xtaflic">="..//">   3   3/*
   3 * Xtaflic">="..//">   3   3 * Xtables module foor ma2ching#i/spudetfiltine" namei/spudec="..//">   3 * Xtaflic">="..//">   3   3 *
   3 * (C) 2002 by Hara2ld We2te <onclick="code=MODULE_AUTHORcontent">
lic">MODULE_AUTHORfilt( 2.6.14.3"
	 s="nsea>"href="net/netfilter/xt_ec">   3   3 * (C) 2011 Patrick2 McHa25e <onclick="code=MODULE_DESCRIPTIONcontent">
lic">MODULE_DESCRIPTIONfilt( 2.6.14.3"
	 s="nsea>"v6 and : ExppanitcCongeslect>Notifica>
	< (id=) flags   3 *

lic">MODULE_LICENSEfilt( 2.6.14.3"
	 s="nsea>"GPL"class=") line" name="L3">   3
  v22.6.21.5
  
  t2ion v27e <onclick="code=MODULE_ALIAScontent">
lic">MODULE_ALIASfilt( 2.6.14.3"
	 s="nsea>"ipspan "class=") line" name="L3">   3
  v2286.21.5
  
  t28on v28e <onclick="code=MODULE_ALIAScontent">
lic">MODULE_ALIASfilt( 2.6.14.3"
	 s="nsea>"ip6span "class=") line" name="L3">   3
  v2296.21.5
  
  t29on v29filtline" name="L3">   3/*

lic">boolfilt vonclick="code=
lic">
lic">sk_bufffilt *vonclick="code=skbcontent">
lic">skbfilt, s="uct vonclick="code=
	<_prefmcontent">
lic">
	<_prefmfilt *vonclick="code=precontent">
lic">parfilt)line" name="L3">   3/*
   3 * Xtables module f3or ma3ching        const s="uct vonclick="code=
lic">
lic">einfofilt =  onclick="code=precontent">
lic">parfilt-L6" conclick="code=
lic">   3 *

lic">tcphdefilt vonclick="code=_tcphcontent">
lic">_tcphfilt line" name="L3">   3 * (C) 2002 by Hara3ld We34hing        const s="uct vonclick="code=tcphdecontent">
lic">tcphdefilt *vonclick="code=thcontent">
lic">thfilt line" name="L3">   3 * (C) 2011 Patrick3 McHa35filtline" name="L3">   3 *

ce,#L3"    3
  v23.6.21.5
  
  t3ion v3lue="v2.6.14.3"
	  >
  v2.6>>>>>>>>>* be good nitizens.class="line" name="L3">   3
  v2386.21.5
  
  t38on v38ue="v2.6.14.3"
	  >
  v2.6>>>>>>>>>*/class="line" name="L3">   3
  v2396.21.5
  
  t39on v39hing        eonclick="code=thcontent">
lic">thfilt =  onclick="code=skb_earc/a_poin
lic">skb_earc/a_poin
lic">skbfilt,  onclick="code=precontent">
lic">parfilt-L6" conclick="code=thoffcontent">
lic">thofffilt, sizeof( onclick="code=_tcphcontent">
lic">_tcphfilt), & conclick="code=_tcphcontent">
lic">_tcphfilt) line" name="L3">   3/*

lic">thfilt ==  onclick="code=NULLcontent">
lic">NULLfilt)line" name="L3">   3/*

lic">f"ajafilt line" name="L3">   3 * Xtables module f4or ma42filtline" name="L3">   3 *

lic">einfofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_idEfilt) {line" name="L3">   3 * (C) 2002 by Haralld We44hing                if ( onclick="code=einfocontent">
lic">einfofilt-L6" conclick="code=invertcontent">
lic">inverthing & d onclick="code=XT_id=_OP_MATCH_idEcontent">
lic">XT_id=_OP_MATCH_idEfilt) {line" name="L3">   3 * (C) 2011 Patrick4 McHa45hing                        if ( onclick="code=thcontent">
lic">thfilt-L6" conclick="code=ecacontent">
lic">ecafilt == 1)line" name="L3">   3 *

lic">f"ajafilt line" name="L3">   3
  v24.6.21.5
  
  t4ion v47hing                } eaja {line" name="L3">   3
  v2486.21.5
  
  t48on v48hing                        if ( onclick="code=thcontent">
lic">thfilt-L6" conclick="code=ecacontent">
lic">ecafilt == 0)line" name="L3">   3
  v2496.21.5
  
  t49on v49hing                                kup" id onclick="code=f"ajacontent">
lic">f"ajafilt line" name="L3">   3/*
   3/*
   3 * Xtables module f5or ma52filtline" name="L3">   3 *

lic">einfofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_CWRfilt) {line" name="L3">   3 * (C) 2002 by Hara5ld We54hing                if ( onclick="code=einfocontent">
lic">einfofilt-L6" conclick="code=invertcontent">
lic">inverthing & d onclick="code=XT_id=_OP_MATCH_CWRcontent">
lic">XT_id=_OP_MATCH_CWRfilt) {line" name="L3">   3 * (C) 2011 Patrick  McHa55hing                        if ( onclick="code=thcontent">
lic">thfilt-L6" conclick="code=cwecontent">
lic">cwefilt == 1)line" name="L3">   3 *

lic">f"ajafilt line" name="L3">   3
  v25.6.21.5
  
  t5ion v57hing                } eaja {line" name="L3">   3
  v2586.21.5
  
  t58on v58hing                        if ( onclick="code=thcontent">
lic">thfilt-L6" conclick="code=cwecontent">
lic">cwefilt == 0)line" name="L3">   3
  v2596.21.5
  
  t59on v59hing                                kup" id onclick="code=f"ajacontent">
lic">f"ajafilt line" name="L3">   3/*
   3/*
   3 * Xtables module f6or ma62filtline" name="L3">   3 *

lic">truafilt line" name="L3">   3 * (C) 2002 by Hara6ld We64hing}line" name="L3">   3 * (C) 2011 Patrick6 McHa65filtline" name="L3">   3 *


lic">inan>
filt vonclick="code=boolcontent">
lic">boolfilt vonclick="code=
lic">
lic">sk_bufffilt *vonclick="code=skbcontent">
lic">skbfilt,line" name="L3">   3
  v26.6.21.5
  
  t6ion v67hing                            const s="uct vonclick="code=
lic">
lic">einfofilt)line" name="L3">   3
  v2686.21.5
  
  t68on v68hing{line" name="L3">   3
  v2696.21.5
  
  t69on v69hing        kup" id(( onclick="code=ip_hdecontent">
lic">ip_hdefilt( onclick="code=skbcontent">
lic">skbfilt)-L6" conclick="code=toscontent">
lic">toshing & d onclick="code=XT_id=_IP_MASKcontent">
lic">XT_id=_IP_MASKfilt) ==  onclick="code=einfocontent">
lic">einfofilt-L6" conclick="code=ippantcontent">
lic">ippantfilt) ^4
  
  
/*

lic">einfofilt-L6" conclick="code=invertcontent">
lic">inverthing & d onclick="code=XT_id=_OP_MATCH_IPcontent">
lic">XT_id=_OP_MATCH_IPfilt) line" name="L3">   3/*
   3 * Xtables module f7or ma72filtline" name="L3">   3 *

lic">boolfilt vonclick="code=an _mt4content">
lic">en _mt4filt(const s="uct vonclick="code=sk_buffcontent">
lic">sk_bufffilt *vonclick="code=skbcontent">
lic">skbfilt, s="uct vonclick="code=
	<_prefmcontent">
lic">
	<_prefmfilt *vonclick="code=precontent">
lic">parfilt)line" name="L3">   3 * (C) 2002 by Hara7ld We74hing{line" name="L3">   3 * (C) 2011 Patrick7 McHa75hing        const s="uct vonclick="code=
lic">
lic">infofilt =  onclick="code=precontent">
lic">parfilt-L6" conclick="code=
lic">   3 *
   3
  v2..6.21.5
  
  tiion v77hing        if ( onclick="code=infocontent">
lic">infofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_IPfilt & & d!vonclick="code=
lic">
lic">skbfilt,  onclick="code=infocontent">
lic">infofilt))line" name="L3">   3
  v2786.21.5
  
  t78on v78hing                kup" id onclick="code=f"ajacontent">
lic">f"ajafilt line" name="L3">   3
  v2796.21.5
  
  t79on v79filtline" name="L3">   3/*

lic">infofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_idEfilt |d onclick="code=XT_id=_OP_MATCH_CWRcontent">
lic">XT_id=_OP_MATCH_CWRfilt) & & line" name="L3">   3/*

lic">
lic">skbfilt,  onclick="code=precontent">
lic">parfilt))line" name="L3">   3 * Xtables module f8or ma82hing                kup" id onclick="code=f"ajacontent">
lic">f"ajafilt line" name="L3">   3 *
   3 * (C) 2002 by Hara8ld We84hing        kup" id onclick="code=truacontent">
lic">truafilt line" name="L3">   3 * (C) 2011 Patrick8 McHa85hing}line" name="L3">   3 *
   3
  v28.6.21.5
  
  t8ion v87hing	
lic">en _mt_check4filt(const s="uct vonclick="code=
lic">
lic">parfilt)line" name="L3">   3
  v2886.21.5
  
  t88on v88hing{line" name="L3">   3
  v2896.21.5
  
  t89on v89hing        const s="uct vonclick="code=
lic">
lic">infofilt =  onclick="code=precontent">
lic">parfilt-L6" conclick="code=
lic">   3/*

lic">ipspipfilt *vonclick="code=ipcontent">
lic">ipfilt =  onclick="code=precontent">
lic">parfilt-L6" conclick="code=entryinfocontent">
lic">entryinfofilt line" name="L3">   3/*
   3 * Xtables module f9or ma92hing        if ( onclick="code=infocontent">
lic">infofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_MASKfilt)line" name="L3">   3 *

lic">EINVALfilt line" name="L3">   3 * (C) 2002 by Hara9ld We94filtline" name="L3">   3 * (C) 2011 Patrick9 McHa95hing        if ( onclick="code=infocontent">
lic">infofilt-L6" conclick="code=invertcontent">
lic">inverthing & d onclick="code=XT_id=_OP_MATCH_MASKcontent">
lic">XT_id=_OP_MATCH_MASKfilt)line" name="L3">   3 *

lic">EINVALfilt line" name="L3">   3
  v29.6.21.5
  
  t9ion v97filtline" name="L3">   3
  v2986.21.5
  
  t98on v98hing        if ( onclick="code=infocontent">
lic">infofilt-L6" conclick="code=opera>
	
lic">opera>
	
lic">XT_id=_OP_MATCH_idEfilt |d onclick="code=XT_id=_OP_MATCH_CWRcontent">
lic">XT_id=_OP_MATCH_CWRfilt) & & line" name="L3">   3
  v2996.21.5
  
  t99on v99hing            ( onclick="code=ipcontent">
lic">ipfilt-L6" conclick="code=protocontent">
lic">protohing !=  onclick="code=IPPROTO_TCPcontent">
lic">IPPROTO_TCPfilt ||d onclick="code=ipcontent">
lic">ipfilt-L6" conclick="code=invflagscontent">
lic">invflagshing & d onclick="code=IPT_INV_PROTOcontent">
lic">IPT_INV_PROTOfilt)) {line" name="L3">   3/*

lic">pr_infofilt( 2.6.14.3"
	 s="nsea>"cannot    3/*

lic">EINVALfilt line" name="L3">   3 * Xtables module f102on n02hing        }line" name="L3">   3 *
   3 * (C) 2002 by Hara104on n04hing        kup" id0 line" name="L3">   3 * (C) 2011 Patrick105on n05hing}line" name="L3">   3 *
   3
  v210.6.21.5
  
  t107on n07hing	
lic">inan>
filt vonclick="code=boolcontent">
lic">boolfilt vonclick="code=
lic">
lic">sk_bufffilt *vonclick="code=skbcontent">
lic">skbfilt,line" name="L3">   3
  v21086.21.5
  
  t108on n08hing                              const s="uct vonclick="code=
lic">
lic">einfofilt)line" name="L3">   3
  v21096.21.5
  
  t109on n09hing{line" name="L3">   3/*

lic">ipv6_hdefilt( onclick="code=skbcontent">
lic">skbfilt)-L6" conclick="code=flow_lblcontent">
lic">flow_lblfilt[0] 	  
lic">XT_id=_IP_MASKfilt) ==line" name="L3"> 3/* lic">einfofilt-L6" conclick="code=ippantcontent"> lic">ippantfilt) ^4 * Xtables module f11or m112hing !!( onclick="code=einfocontent"> lic">einfofilt-L6" conclick="code=invertcontent"> lic">inverthing & d onclick="code=XT_id=_OP_MATCH_IPcontent"> lic">XT_id=_OP_MATCH_IPfilt) line" name="L3"> 3 * 3 * (C) 2002 by Hara11ld W114filtline" name="L3"> 3 * (C) 2011 Patrick11 McH115hing lic">boolfilt vonclick="code=an _mt6content"> lic">an _mt6filt(const s="uct vonclick="code=sk_buffcontent"> lic">sk_bufffilt *vonclick="code=skbcontent"> lic">skbfilt, s="uct vonclick="code= <_prefmcontent"> lic"> <_prefmfilt *vonclick="code=precontent"> lic">parfilt)line" name="L3"> 3 * 3 v211.6.21.5 t11ion 117hing const s="uct vonclick="code= lic"> lic">infofilt = onclick="code=precontent"> lic">parfilt-L6" conclick="code= lic"> 3 v21186.21.5 t118on 118filtline" name="L3"> 3 v21196.21.5 t119on 119hing if ( onclick="code=infocontent"> lic">infofilt-L6" conclick="code=opera> lic">opera> lic">XT_id=_OP_MATCH_IPfilt & & d!vonclick="code= lic"> lic">skbfilt, onclick="code=infocontent"> lic">infofilt))line" name="L3"> 3/* lic">f"ajafilt line" name="L3"> 3/* 3 * Xtables module f1oor m122hing if ( onclick="code=infocontent"> lic">infofilt-L6" conclick="code=opera> lic">opera> lic">XT_id=_OP_MATCH_idEfilt |d onclick="code=XT_id=_OP_MATCH_CWRcontent"> lic">XT_id=_OP_MATCH_CWRfilt) & & line" name="L3"> 3 * lic"> lic">skbfilt, onclick="code=precontent"> lic">parfilt))line" name="L3"> 3 * (C) 2002 by Hara12ld W124hing kup" id onclick="code=f"ajacontent"> lic">f"ajafilt line" name="L3"> 3 * (C) 2011 Patrick12 McH125filtline" name="L3"> 3 * lic">truafilt line" name="L3"> 3 v212.6.21.5 t12ion 127e &l}line" name="L3"> 3 v21286.21.5 t128on 128filtline" name="L3"> 3 v21296.21.5 t129on 129filt lic">an _mt_check6filt(const s="uct vonclick="code= lic"> lic">parfilt)line" name="L3"> 3/* 3/* lic"> lic">infofilt = onclick="code=precontent"> lic">parfilt-L6" conclick="code= lic"> 3 * Xtables module f13or m13ching const s="uct vonclick="code=ip6spip6content"> lic">ip6spip6filt *vonclick="code=ipcontent"> lic">ipfilt = onclick="code=precontent"> lic">parfilt-L6" conclick="code=entryinfocontent"> lic">entryinfofilt line" name="L3"> 3 * 3 * (C) 2002 by Hara13ld W134hing if ( onclick="code=infocontent"> lic">infofilt-L6" conclick="code=opera> lic">opera> lic">XT_id=_OP_MATCH_MASKfilt)line" name="L3"> 3 * (C) 2011 Patrick13 McH135hing kup" id- onclick="code=EINVALcontent"> lic">EINVALfilt line" name="L3"> 3 * 3 v213.6.21.5 t13ion 137hing if ( onclick="code=infocontent"> lic">infofilt-L6" conclick="code=invertcontent"> lic">inverthing & d onclick="code=XT_id=_OP_MATCH_MASKcontent"> lic">XT_id=_OP_MATCH_MASKfilt)line" name="L3"> 3 v21386.21.5 t138on 138hing kup" id- onclick="code=EINVALcontent"> lic">EINVALfilt line" name="L3"> 3 v21396.21.5 t139on 139filtline" name="L3"> 3/* lic">infofilt-L6" conclick="code=opera> lic">opera> lic">XT_id=_OP_MATCH_idEfilt |d onclick="code=XT_id=_OP_MATCH_CWRcontent"> lic">XT_id=_OP_MATCH_CWRfilt) & & line" name="L3"> 3/* lic">ipfilt-L6" conclick="code=protocontent"> lic">protohing != onclick="code=IPPROTO_TCPcontent"> lic">IPPROTO_TCPfilt ||d onclick="code=ipcontent"> lic">ipfilt-L6" conclick="code=invflagscontent"> lic">invflagshing & d onclick="code=IP6T_INV_PROTOcontent"> lic">IP6T_INV_PROTOfilt)) {line" name="L3"> 3 * Xtables module f14or m142hing conclick="code=pr_infocontent"> lic">pr_infofilt( 2.6.14.3" s="nsea>"cannot 3 * lic">EINVALfilt line" name="L3"> 3 * (C) 2002 by Hara1lld W144hing }line" name="L3"> 3 * (C) 2011 Patrick14 McH145filtline" name="L3"> 3 * 3 v214.6.21.5 t14ion 147e &l}line" name="L3"> 3 v21486.21.5 t148on 148filtline" name="L3"> 3 v21496.21.5 t149on 149filt lic"> lic">an _mt_regfilt[] vonclick="code=__read_mostlycontent"> lic">__read_mostlyfilt = {line" name="L3"> 3/* 3/* lic"> hrehing = v2.6.14.3" s="nsea>"en "class=",line" name="L3"> 3 * Xtables module f15or m152hing .vonclick="code=familycontent"> lic">familyhing = onclick="code=NFPROTO_IPV4content"> lic">NFPROTO_IPV4filt,line" name="L3"> 3 * lic">m/spafilt = onclick="code=an _mt4content"> lic">en _mt4filt,line" name="L3"> 3 * (C) 2002 by Hara15ld W154hing .vonclick="code=m/spasizecontent"> lic">m/spasizehing = sizeof(s="uct vonclick="code= lic"> 3 * (C) 2011 Patrick1 McH155hing .vonclick="code=checkentrycontent"> lic">checkentryhing = onclick="code=an _mt_check4content"> lic">en _mt_check4filt,line" name="L3"> 3 * lic">mehing = onclick="code=THIS_MODULEcontent"> lic">THIS_MODULEfilt,line" name="L3"> 3 v215.6.21.5 t15ion 157hing },line" name="L3"> 3 v21586.21.5 t158on 158hing {line" name="L3"> 3 v21596.21.5 t159on 159hing .vonclick="code= hrecontent"> lic"> hrehing = v2.6.14.3" s="nsea>"en "class=",line" name="L3"> 3/* lic">familyhing = onclick="code=NFPROTO_IPV6content"> lic">NFPROTO_IPV6filt,line" name="L3"> 3/* lic">m/spafilt = onclick="code=an _mt6content"> lic">an _mt6filt,line" name="L3"> 3 * Xtables module f16or m162hing .vonclick="code=m/spasizecontent"> lic">m/spasizehing = sizeof(s="uct vonclick="code= lic"> 3 * lic">checkentryhing = onclick="code=an _mt_check6content"> lic">an _mt_check6filt,line" name="L3"> 3 * (C) 2002 by Hara16ld W164hing .vonclick="code=mecontent"> lic">mehing = onclick="code=THIS_MODULEcontent"> lic">THIS_MODULEfilt,line" name="L3"> 3 * (C) 2011 Patrick16 McH165hing },line" name="L3"> 3 * 3 v216.6.21.5 t16ion 167filtline" name="L3"> 3 v21686.21.5 t168on 168hing lic">__initfilt vonclick="code=an _mt_initcontent"> lic">an _mt_initfilt(void)line" name="L3"> 3 v21696.21.5 t169on 169hing{line" name="L3"> 3/* lic"> lic">an _mt_regfilt, onclick="code=ARRAY_SIZEcontent"> lic">ARRAY_SIZEfilt( onclick="code=an _mt_regcontent"> lic">an _mt_regfilt)) line" name="L3"> 3/* 3 * Xtables module f17or m172filtline" name="L3"> 3 * lic">__exitfilt vonclick="code=an _mt_exitcontent"> lic">an _mt_exitfilt(void)line" name="L3"> 3 * (C) 2002 by Hara17ld W174hing{line" name="L3"> 3 * (C) 2011 Patrick17 McH175hing vonclick="code= lic"> lic">an _mt_regfilt, onclick="code=ARRAY_SIZEcontent"> lic">ARRAY_SIZEfilt( onclick="code=an _mt_regcontent"> lic">an _mt_regfilt)) line" name="L3"> 3 * 3 v21..6.21.5 t1iion 177filtline" name="L3"> 3 v21786.21.5 t178on 178e <onclick="code=CP ECN_initcontent"> lic">CP ECN_initfilt( onclick="code=an _mt_initcontent"> lic">an _mt_initfilt) line" name="L3"> 3 v21796.21.5 t179on 179filttonclick="code=CP ECN_exitcontent"> lic">CP ECN_exitfilt( onclick="code=an _mt_exitcontent"> lic">an _mt_exitfilt) line" name="L3"> 3/* The original LXR software LXR > unityfilt, valu experi v2al eersect>lxa@l"../.nofilt.
lxa.l"../.no kindly hosRedpill L".pro ASfilt,s