分类: LINUX
2010-04-17 12:34:49
ct->tuplehash[IP_CT_DIR_ORIGNAL].tuple=
src:C_W:xx
661 if
((h) == ) {
662 *ctinfo = + ;
663 /* Please set reply bit
if this packet OK */
664 * = 1;
665 } else
{
666 /* Once we've had two
way comms, always ESTABLISHED. */
667 if ((, &ct->)) {
668 ("nf_conntrack_in: normal packet for %p\n", ct);
669 *ctinfo = ;
670 } else if ((, &ct->)) {
671 ("nf_conntrack_in:
related packet for %p\n",
672 ct);
673 *ctinfo = ;
674 } else {
675 ("nf_conntrack_in: new packet for %p\n", ct);
676 *ctinfo = ;
677 }
678 * = 0;
679 }
680
-> = &ct->;
681 -> = *ctinfo;
(, &ct->)成立,所以,ctinfo=
- - ->
所以,dir=IP_CT_DIR_ORIGNAL;
396 enum
= ();
PREROUTING:mtype=
于是:
401 statusbit = ;
由于之前建立连接时ct->status设置成了DNAT;所以,
/* Non-atomic: these bits don't change. */
408 if
(ct-> & statusbit) {
409 struct ;
410
411 /* We are aiming to
look like inverse of other direction. */
412 (&target, &ct->[!dir].);
413
414 if (!(target.., , 0, &target, ))
415 return ;
416 }
target=invert(ct->tuplehash[reply].tuple)=
src:C_W:xx
dst:S_L:80
else {
382 (&->, ->, target->..);
383 -> = target->..;
384 }
于是,数据包成为:
src:C_W:xx
dst:S_L:80
路由之后,来到POSTROUTING
399 statusbit = ;
408 if
(ct-> & statusbit) 则为假。
执行完毕;
没有可confirmed的;