lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070516102934.GA26934@router.lepton.home>
Date:	Wed, 16 May 2007 18:29:35 +0800
From:	lepton <ytht.net@...il.com>
To:	netdev@...r.kernel.org
Subject: why we use skb->rt->rt_src as dest address when replying packet?

I found in function [ip_send_reply] and [icmp_reply], we
use such code to get the destination address of our
packet:

struct rtable *rt = (struct rtable *)skb->dst;
......
daddr = ipc.addr = rt->rt_src;

I have a question here:
Is there any special reason for using rt->rt_src as destination address?
Can I use codes like these?

struct iph * ip = skb->nh.iph;
......
daddr = ipc.addr = ip->saddr;

I found in some case, rt->rt_src is not equal to ip->saddr. Thanks.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ