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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48508217.1070006@hp.com>
Date:	Wed, 11 Jun 2008 21:55:35 -0400
From:	Brian Haley <brian.haley@...com>
To:	"Julius R. Volz" <juliusv@...gle.com>
Cc:	lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
	horms@...ge.net.au, davem@...emloft.net, vbusam@...gle.com
Subject: Re: [PATCH 20/26] IPVS: Add IPv6 Netfilter hooks and add/modify support
 functions.

Julius R. Volz wrote:
> +#ifdef CONFIG_IP_VS_IPV6
> +void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp,
> +		    struct ip_vs_conn *cp, int inout)
> +{
> +	struct ipv6hdr *iph	 = ipv6_hdr(skb);
> +	unsigned int icmp_offset = sizeof(struct ipv6hdr);
> +	struct icmp6hdr *icmph	 = (struct icmp6hdr *)(skb_network_header(skb) +
> +						      icmp_offset);
> +	struct ipv6hdr *ciph	 = (struct ipv6hdr *)(icmph + 1);
> +
> +	if (inout) {
> +		iph->saddr = cp->vaddr.v6;
> +		ciph->daddr = cp->vaddr.v6;
> +	} else {
> +		iph->daddr = cp->daddr.v6;
> +		ciph->saddr = cp->daddr.v6;
> +	}

ipv6_addr_copy().

> +	/* mangle the packet */
> +	if (pp->snat_handler_v6 && !pp->snat_handler_v6(skb, pp, cp))
> +		goto drop;
> +	ipv6_hdr(skb)->saddr = cp->vaddr.v6;

ipv6_addr_copy().

-Brian
--
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