Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet flip src/dst



details:   https://anonhg.NetBSD.org/src/rev/919422e77e8c
branches:  trunk
changeset: 787655:919422e77e8c
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jun 27 20:17:36 2013 +0000

description:
flip src/dst

diffstat:

 sys/netinet/ip_input.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r f71b3868b91b -r 919422e77e8c sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Thu Jun 27 20:14:25 2013 +0000
+++ b/sys/netinet/ip_input.c    Thu Jun 27 20:17:36 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $  */
+/*     $NetBSD: ip_input.c,v 1.307 2013/06/27 20:17:36 christos Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.306 2013/06/27 19:38:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.307 2013/06/27 20:17:36 christos Exp $");
 
 #include "opt_inet.h"
 #include "opt_compat_netbsd.h"
@@ -1407,7 +1407,7 @@
        }
        if (inp->inp_flags & INP_RECVPKTINFO) {
                struct in_pktinfo ipi;
-               ipi.ipi_addr = ip->ip_dst;
+               ipi.ipi_addr = ip->ip_src;
                ipi.ipi_ifindex = m->m_pkthdr.rcvif->if_index;
                *mp = sbcreatecontrol((void *) &ipi,
                    sizeof(ipi), IP_RECVPKTINFO, IPPROTO_IP);
@@ -1416,7 +1416,7 @@
        }
        if (inp->inp_flags & INP_PKTINFO) {
                struct in_pktinfo ipi;
-               ipi.ipi_addr = ip->ip_src;
+               ipi.ipi_addr = ip->ip_dst;
                ipi.ipi_ifindex = m->m_pkthdr.rcvif->if_index;
                *mp = sbcreatecontrol((void *) &ipi,
                    sizeof(ipi), IP_PKTINFO, IPPROTO_IP);



Home | Main Index | Thread Index | Old Index