亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ip_nat_core.c

?? 優龍2410linux2.6.8內核源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
			      conntrack->tuplehash[IP_CT_DIR_ORIGINAL]			      .tuple.dst.protonum);	/* We place packet as seen OUTGOUNG in byips_proto hash           (ie. reverse dst and src of reply packet. */	unsigned int ipsprotohash		= hash_by_ipsproto(conntrack->tuplehash[IP_CT_DIR_REPLY]				   .tuple.dst.ip,				   conntrack->tuplehash[IP_CT_DIR_REPLY]				   .tuple.src.ip,				   conntrack->tuplehash[IP_CT_DIR_REPLY]				   .tuple.dst.protonum);	IP_NF_ASSERT(!info->bysource.conntrack);	MUST_BE_WRITE_LOCKED(&ip_nat_lock);	info->byipsproto.conntrack = conntrack;	info->bysource.conntrack = conntrack;	list_prepend(&bysource[srchash], &info->bysource);	list_prepend(&byipsproto[ipsprotohash], &info->byipsproto);}/* Returns true if succeeded. */static intmanip_pkt(u_int16_t proto,	  struct sk_buff **pskb,	  unsigned int iphdroff,	  const struct ip_conntrack_manip *manip,	  enum ip_nat_manip_type maniptype){	struct iphdr *iph;	(*pskb)->nfcache |= NFC_ALTERED;	if (!skb_ip_make_writable(pskb, iphdroff+sizeof(iph)))		return 0;	iph = (void *)(*pskb)->data + iphdroff;	/* Manipulate protcol part. */	if (!find_nat_proto(proto)->manip_pkt(pskb,					      iphdroff + iph->ihl*4,					      manip, maniptype))		return 0;	iph = (void *)(*pskb)->data + iphdroff;	if (maniptype == IP_NAT_MANIP_SRC) {		iph->check = ip_nat_cheat_check(~iph->saddr, manip->ip,						iph->check);		iph->saddr = manip->ip;	} else {		iph->check = ip_nat_cheat_check(~iph->daddr, manip->ip,						iph->check);		iph->daddr = manip->ip;	}	return 1;}static inline int exp_for_packet(struct ip_conntrack_expect *exp,			         struct sk_buff *skb){	struct ip_conntrack_protocol *proto;	int ret = 1;	MUST_BE_READ_LOCKED(&ip_conntrack_lock);	proto = __ip_ct_find_proto(skb->nh.iph->protocol);	if (proto->exp_matches_pkt)		ret = proto->exp_matches_pkt(exp, skb);	return ret;}/* Do packet manipulations according to binding. */unsigned intdo_bindings(struct ip_conntrack *ct,	    enum ip_conntrack_info ctinfo,	    struct ip_nat_info *info,	    unsigned int hooknum,	    struct sk_buff **pskb){	unsigned int i;	struct ip_nat_helper *helper;	enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);	int proto = (*pskb)->nh.iph->protocol;	/* Need nat lock to protect against modification, but neither	   conntrack (referenced) and helper (deleted with	   synchronize_bh()) can vanish. */	READ_LOCK(&ip_nat_lock);	for (i = 0; i < info->num_manips; i++) {		if (info->manips[i].direction == dir		    && info->manips[i].hooknum == hooknum) {			DEBUGP("Mangling %p: %s to %u.%u.%u.%u %u\n",			       *pskb,			       info->manips[i].maniptype == IP_NAT_MANIP_SRC			       ? "SRC" : "DST",			       NIPQUAD(info->manips[i].manip.ip),			       htons(info->manips[i].manip.u.all));			if (!manip_pkt(proto, pskb, 0,				       &info->manips[i].manip,				       info->manips[i].maniptype)) {				READ_UNLOCK(&ip_nat_lock);				return NF_DROP;			}		}	}	helper = info->helper;	READ_UNLOCK(&ip_nat_lock);	if (helper) {		struct ip_conntrack_expect *exp = NULL;		struct list_head *cur_item;		int ret = NF_ACCEPT;		int helper_called = 0;		DEBUGP("do_bindings: helper existing for (%p)\n", ct);		/* Always defragged for helpers */		IP_NF_ASSERT(!((*pskb)->nh.iph->frag_off			       & htons(IP_MF|IP_OFFSET)));		/* Have to grab read lock before sibling_list traversal */		READ_LOCK(&ip_conntrack_lock);		list_for_each_prev(cur_item, &ct->sibling_list) { 			exp = list_entry(cur_item, struct ip_conntrack_expect, 					 expected_list);					 			/* if this expectation is already established, skip */			if (exp->sibling)				continue;			if (exp_for_packet(exp, *pskb)) {				/* FIXME: May be true multiple times in the				 * case of UDP!! */				DEBUGP("calling nat helper (exp=%p) for packet\n", exp);				ret = helper->help(ct, exp, info, ctinfo, 						   hooknum, pskb);				if (ret != NF_ACCEPT) {					READ_UNLOCK(&ip_conntrack_lock);					return ret;				}				helper_called = 1;			}		}		/* Helper might want to manip the packet even when there is no		 * matching expectation for this packet */		if (!helper_called && helper->flags & IP_NAT_HELPER_F_ALWAYS) {			DEBUGP("calling nat helper for packet without expectation\n");			ret = helper->help(ct, NULL, info, ctinfo, 					   hooknum, pskb);			if (ret != NF_ACCEPT) {				READ_UNLOCK(&ip_conntrack_lock);				return ret;			}		}		READ_UNLOCK(&ip_conntrack_lock);				/* Adjust sequence number only once per packet 		 * (helper is called at all hooks) */		if (proto == IPPROTO_TCP		    && (hooknum == NF_IP_POST_ROUTING			|| hooknum == NF_IP_LOCAL_IN)) {			DEBUGP("ip_nat_core: adjusting sequence number\n");			/* future: put this in a l4-proto specific function,			 * and call this function here. */			if (!ip_nat_seq_adjust(pskb, ct, ctinfo))				ret = NF_DROP;		}		return ret;	} else 		return NF_ACCEPT;	/* not reached */}inticmp_reply_translation(struct sk_buff **pskb,		       struct ip_conntrack *conntrack,		       unsigned int hooknum,		       int dir){	struct {		struct icmphdr icmp;		struct iphdr ip;	} *inside;	unsigned int i;	struct ip_nat_info *info = &conntrack->nat.info;	int hdrlen;	if (!skb_ip_make_writable(pskb,(*pskb)->nh.iph->ihl*4+sizeof(*inside)))		return 0;	inside = (void *)(*pskb)->data + (*pskb)->nh.iph->ihl*4;	/* We're actually going to mangle it beyond trivial checksum	   adjustment, so make sure the current checksum is correct. */	if ((*pskb)->ip_summed != CHECKSUM_UNNECESSARY) {		hdrlen = (*pskb)->nh.iph->ihl * 4;		if ((u16)csum_fold(skb_checksum(*pskb, hdrlen,						(*pskb)->len - hdrlen, 0)))			return 0;	}	/* Must be RELATED */	IP_NF_ASSERT((*pskb)->nfct		     - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos		     == IP_CT_RELATED		     || (*pskb)->nfct		     - ((struct ip_conntrack *)(*pskb)->nfct->master)->infos		     == IP_CT_RELATED+IP_CT_IS_REPLY);	/* Redirects on non-null nats must be dropped, else they'll           start talking to each other without our translation, and be           confused... --RR */	if (inside->icmp.type == ICMP_REDIRECT) {		/* Don't care about races here. */		if (info->initialized		    != ((1 << IP_NAT_MANIP_SRC) | (1 << IP_NAT_MANIP_DST))		    || info->num_manips != 0)			return 0;	}	DEBUGP("icmp_reply_translation: translating error %p hook %u dir %s\n",	       *pskb, hooknum, dir == IP_CT_DIR_ORIGINAL ? "ORIG" : "REPLY");	/* Note: May not be from a NAT'd host, but probably safest to	   do translation always as if it came from the host itself	   (even though a "host unreachable" coming from the host	   itself is a bit weird).	   More explanation: some people use NAT for anonymizing.	   Also, CERT recommends dropping all packets from private IP	   addresses (although ICMP errors from internal links with	   such addresses are not too uncommon, as Alan Cox points	   out) */	READ_LOCK(&ip_nat_lock);	for (i = 0; i < info->num_manips; i++) {		DEBUGP("icmp_reply: manip %u dir %s hook %u\n",		       i, info->manips[i].direction == IP_CT_DIR_ORIGINAL ?		       "ORIG" : "REPLY", info->manips[i].hooknum);		if (info->manips[i].direction != dir)			continue;		/* Mapping the inner packet is just like a normal		   packet, except it was never src/dst reversed, so		   where we would normally apply a dst manip, we apply		   a src, and vice versa. */		if (info->manips[i].hooknum == hooknum) {			DEBUGP("icmp_reply: inner %s -> %u.%u.%u.%u %u\n",			       info->manips[i].maniptype == IP_NAT_MANIP_SRC			       ? "DST" : "SRC",			       NIPQUAD(info->manips[i].manip.ip),			       ntohs(info->manips[i].manip.u.udp.port));			if (!manip_pkt(inside->ip.protocol, pskb,				       (*pskb)->nh.iph->ihl*4				       + sizeof(inside->icmp),				       &info->manips[i].manip,				       !info->manips[i].maniptype))				goto unlock_fail;			/* Outer packet needs to have IP header NATed like	                   it's a reply. */			/* Use mapping to map outer packet: 0 give no                           per-proto mapping */			DEBUGP("icmp_reply: outer %s -> %u.%u.%u.%u\n",			       info->manips[i].maniptype == IP_NAT_MANIP_SRC			       ? "SRC" : "DST",			       NIPQUAD(info->manips[i].manip.ip));			if (!manip_pkt(0, pskb, 0,				       &info->manips[i].manip,				       info->manips[i].maniptype))				goto unlock_fail;		}	}	READ_UNLOCK(&ip_nat_lock);	hdrlen = (*pskb)->nh.iph->ihl * 4;	inside = (void *)(*pskb)->data + (*pskb)->nh.iph->ihl*4;	inside->icmp.checksum = 0;	inside->icmp.checksum = csum_fold(skb_checksum(*pskb, hdrlen,						       (*pskb)->len - hdrlen,						       0));	return 1; unlock_fail:	READ_UNLOCK(&ip_nat_lock);	return 0;}int __init ip_nat_init(void){	size_t i;	/* Leave them the same for the moment. */	ip_nat_htable_size = ip_conntrack_htable_size;	/* One vmalloc for both hash tables */	bysource = vmalloc(sizeof(struct list_head) * ip_nat_htable_size*2);	if (!bysource) {		return -ENOMEM;	}	byipsproto = bysource + ip_nat_htable_size;	/* Sew in builtin protocols. */	WRITE_LOCK(&ip_nat_lock);	list_append(&protos, &ip_nat_protocol_tcp);	list_append(&protos, &ip_nat_protocol_udp);	list_append(&protos, &ip_nat_protocol_icmp);	WRITE_UNLOCK(&ip_nat_lock);	for (i = 0; i < ip_nat_htable_size; i++) {		INIT_LIST_HEAD(&bysource[i]);		INIT_LIST_HEAD(&byipsproto[i]);	}	/* FIXME: Man, this is a hack.  <SIGH> */	IP_NF_ASSERT(ip_conntrack_destroyed == NULL);	ip_conntrack_destroyed = &ip_nat_cleanup_conntrack;		/* Initialize fake conntrack so that NAT will skip it */	ip_conntrack_untracked.nat.info.initialized |= 		(1 << IP_NAT_MANIP_SRC) | (1 << IP_NAT_MANIP_DST);	return 0;}/* Clear NAT section of all conntracks, in case we're loaded again. */static int clean_nat(const struct ip_conntrack *i, void *data){	memset((void *)&i->nat, 0, sizeof(i->nat));	return 0;}/* Not __exit: called from ip_nat_standalone.c:init_or_cleanup() --RR */void ip_nat_cleanup(void){	ip_ct_selective_cleanup(&clean_nat, NULL);	ip_conntrack_destroyed = NULL;	vfree(bysource);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国久久99热| 东方aⅴ免费观看久久av| 麻豆成人免费电影| 丁香激情综合国产| 欧美日韩高清影院| 国产日产欧产精品推荐色| 亚洲欧美日韩一区二区三区在线观看| 亚洲成人av一区二区| 成人黄色软件下载| 日韩欧美国产精品一区| 亚洲精选一二三| 国产一区二区h| 欧美高清视频不卡网| 久久精品一区四区| 午夜欧美电影在线观看| 成人网在线免费视频| 日韩精品一区二区三区swag | 亚洲欧美另类在线| 久久er精品视频| 欧美色手机在线观看| 亚洲少妇屁股交4| 成人永久看片免费视频天堂| 欧美一级片免费看| 亚洲一区国产视频| 99久久国产免费看| 欧美国产日本视频| 国产美女精品一区二区三区| 欧美一卡2卡3卡4卡| 亚洲成人自拍一区| 色综合天天综合网国产成人综合天 | 91麻豆免费看| 中文字幕精品综合| 国产九色精品成人porny| 日韩欧美久久一区| 日韩精品一卡二卡三卡四卡无卡| 精品视频1区2区3区| 亚洲黄色小说网站| 91久久免费观看| 一区二区三区四区乱视频| av亚洲精华国产精华| 1000部国产精品成人观看| 国产成人精品网址| 中文在线免费一区三区高中清不卡| 国产美女主播视频一区| 亚洲综合色区另类av| 韩国毛片一区二区三区| 2017欧美狠狠色| 国产福利精品一区二区| 中文字幕av不卡| 99r精品视频| 亚洲国产综合视频在线观看| 欧美性大战久久久久久久蜜臀| 亚洲最大色网站| 在线成人免费观看| 久久成人综合网| 国产亚洲欧美激情| av电影在线观看完整版一区二区| 中文字幕一区在线观看视频| 99精品久久免费看蜜臀剧情介绍| 伊人婷婷欧美激情| 欧美日本国产一区| 美脚の诱脚舐め脚责91| 2017欧美狠狠色| 91在线视频播放| 水野朝阳av一区二区三区| 精品成人佐山爱一区二区| 国产成人精品亚洲777人妖 | 国产精品美女久久久久久| 97久久精品人人澡人人爽| 亚洲国产成人av网| 欧美成人在线直播| 99国产一区二区三精品乱码| 首页亚洲欧美制服丝腿| 亚洲精品一区二区在线观看| 色综合视频一区二区三区高清| 亚洲国产cao| 久久蜜臀中文字幕| 欧美午夜视频网站| 激情偷乱视频一区二区三区| 亚洲欧美在线高清| 日韩视频免费观看高清在线视频| 国产sm精品调教视频网站| 亚洲一区二区黄色| 国产午夜亚洲精品羞羞网站| 欧美午夜寂寞影院| 国产福利一区在线观看| 亚洲超丰满肉感bbw| 久久久亚洲国产美女国产盗摄 | 亚洲欧洲综合另类| 欧美精品一区二区在线播放| 色婷婷狠狠综合| 国产精品一二三四五| 亚洲bdsm女犯bdsm网站| 国产精品久久久久三级| 91精品国产免费| 色先锋资源久久综合| 国产精品一区二区在线看| 亚洲成av人片一区二区梦乃| 国产精品久久久久久久久久免费看 | 国产精品白丝av| 日韩电影免费在线看| 一区二区三区 在线观看视频| 国产欧美一区二区三区在线看蜜臀| 欧美日韩精品久久久| 91尤物视频在线观看| 国产成人亚洲综合色影视| 麻豆国产精品官网| 无码av免费一区二区三区试看 | 日韩制服丝袜先锋影音| 一区二区三区资源| 国产精品成人在线观看| 日本一区二区视频在线| 欧美精品一区二区高清在线观看| 在线精品亚洲一区二区不卡| kk眼镜猥琐国模调教系列一区二区| 免费亚洲电影在线| 日韩精品乱码免费| 青青草一区二区三区| 午夜精品久久久久久久久久久| 一区二区三区中文在线| 亚洲伦在线观看| 亚洲精品免费在线观看| 亚洲色大成网站www久久九九| 国产精品久久久久一区二区三区| 国产精品视频麻豆| 国产精品久久毛片| 亚洲日本成人在线观看| 一区二区三区资源| 亚洲国产精品久久久男人的天堂 | 欧美天堂一区二区三区| 欧美日韩在线不卡| 欧美日韩视频在线第一区| 欧美一级一级性生活免费录像| 日韩欧美一级精品久久| 精品国产1区二区| 欧美国产欧美综合| 综合av第一页| 亚洲一区国产视频| 日日夜夜免费精品视频| 开心九九激情九九欧美日韩精美视频电影 | 日韩欧美一区二区免费| 久久综合久久99| 国产三级一区二区| 亚洲欧洲性图库| 婷婷亚洲久悠悠色悠在线播放| 免费观看在线色综合| 国产精品一区久久久久| 91在线porny国产在线看| 欧美日韩在线精品一区二区三区激情| 欧美一级一级性生活免费录像| 久久综合色综合88| 亚洲欧美日韩一区二区三区在线观看| 一片黄亚洲嫩模| 理论电影国产精品| 不卡一区二区在线| 欧美日韩第一区日日骚| 欧美精品一区二区在线观看| 亚洲欧洲韩国日本视频| 久久99久久久久| av日韩在线网站| 91精品国产综合久久久久久久 | 国产精品毛片高清在线完整版 | 一区在线播放视频| 日韩av中文在线观看| www.亚洲激情.com| 欧美成人video| 亚洲视频免费在线观看| 久久精品国产久精国产| 色综合av在线| 国产视频在线观看一区二区三区| 亚洲成人资源在线| 成人激情黄色小说| 日韩美女天天操| 亚洲精选免费视频| 成人免费视频国产在线观看| 欧美日韩成人一区二区| 国产精品久久久久久久久久久免费看 | 久久久不卡影院| 亚洲成人黄色小说| 一本大道久久a久久精二百| 精品久久久久久久久久久久久久久久久 | www.亚洲人| 精品国产免费人成在线观看| 夜夜操天天操亚洲| www.色综合.com| 国产午夜三级一区二区三| 日本成人中文字幕| 91久久精品国产91性色tv | 91精品国产综合久久香蕉的特点| 一色桃子久久精品亚洲| 国产成人在线影院 | √…a在线天堂一区| 国产精品一区二区在线观看不卡| 日韩欧美三级在线| 日本不卡123| 91精品免费观看| 石原莉奈在线亚洲三区| 欧美三级视频在线| 亚洲成年人影院| 欧美日韩精品一二三区|