ip_nat.c (58d7f9e6) ip_nat.c (af5f29dd)
1/*
2 * Copyright (C) 1995-2004 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 */

--- 4052 unchanged lines hidden (view full) ---

4061 if (fin->fin_v == 6) {
4062#ifdef USE_INET6
4063 return fr_nat6out(fin, nat, natadd, nflags);
4064#else
4065 return NULL;
4066#endif
4067 }
4068
1/*
2 * Copyright (C) 1995-2004 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 */

--- 4052 unchanged lines hidden (view full) ---

4061 if (fin->fin_v == 6) {
4062#ifdef USE_INET6
4063 return fr_nat6out(fin, nat, natadd, nflags);
4064#else
4065 return NULL;
4066#endif
4067 }
4068
4069#if SOLARIS && defined(_KERNEL)
4069#if defined(SOLARIS) && defined(_KERNEL)
4070 net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
4071#endif
4072
4073 tcp = NULL;
4074 icmp = NULL;
4075 csump = NULL;
4076 np = nat->nat_ptr;
4077

--- 310 unchanged lines hidden (view full) ---

4388 if (fin->fin_v == 6) {
4389#ifdef USE_INET6
4390 return fr_nat6in(fin, nat, natadd, nflags);
4391#else
4392 return NULL;
4393#endif
4394 }
4395
4070 net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
4071#endif
4072
4073 tcp = NULL;
4074 icmp = NULL;
4075 csump = NULL;
4076 np = nat->nat_ptr;
4077

--- 310 unchanged lines hidden (view full) ---

4388 if (fin->fin_v == 6) {
4389#ifdef USE_INET6
4390 return fr_nat6in(fin, nat, natadd, nflags);
4391#else
4392 return NULL;
4393#endif
4394 }
4395
4396#if SOLARIS && defined(_KERNEL)
4396#if defined(SOLARIS) && defined(_KERNEL)
4397 net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
4398#endif
4399
4400 tcp = NULL;
4401 csump = NULL;
4402 np = nat->nat_ptr;
4403 fin->fin_fr = nat->nat_fr;
4404

--- 69 unchanged lines hidden (view full) ---

4474 */
4475 if (csump != NULL) {
4476 if (nat->nat_dir == NAT_OUTBOUND)
4477 fix_incksum(csump, nat->nat_sumd[0]);
4478 else
4479 fix_outcksum(csump, nat->nat_sumd[0]);
4480 }
4481
4397 net_handle_t net_data_p = ifs->ifs_ipf_ipv4;
4398#endif
4399
4400 tcp = NULL;
4401 csump = NULL;
4402 np = nat->nat_ptr;
4403 fin->fin_fr = nat->nat_fr;
4404

--- 69 unchanged lines hidden (view full) ---

4474 */
4475 if (csump != NULL) {
4476 if (nat->nat_dir == NAT_OUTBOUND)
4477 fix_incksum(csump, nat->nat_sumd[0]);
4478 else
4479 fix_outcksum(csump, nat->nat_sumd[0]);
4480 }
4481
4482#if SOLARIS && defined(_KERNEL)
4482#if defined(SOLARIS) && defined(_KERNEL)
4483 if (nflags & IPN_TCPUDP &&
4484 NET_IS_HCK_L4_PART(net_data_p, fin->fin_m)) {
4485 /*
4486 * Need to adjust the partial checksum result stored in
4487 * db_cksum16, which will be used for validation in IP.
4488 * See IP_CKSUM_RECV().
4489 * Adjustment data should be the inverse of the IP address
4490 * changes, because db_cksum16 is supposed to be the complement

--- 1369 unchanged lines hidden ---
4483 if (nflags & IPN_TCPUDP &&
4484 NET_IS_HCK_L4_PART(net_data_p, fin->fin_m)) {
4485 /*
4486 * Need to adjust the partial checksum result stored in
4487 * db_cksum16, which will be used for validation in IP.
4488 * See IP_CKSUM_RECV().
4489 * Adjustment data should be the inverse of the IP address
4490 * changes, because db_cksum16 is supposed to be the complement

--- 1369 unchanged lines hidden ---