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]
Date:   Thu, 15 Apr 2021 10:00:49 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Saeed Mahameed <saeed@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        "Cc : Steffen Klassert" <steffen.klassert@...unet.com>,
        Huy Nguyen <huyn@...dia.com>, Raed Salem <raeds@...dia.com>
Subject: Re: [PATCH net 2/3] net/xfrm: Add inner_ipproto into sec_path

On Wed, 14 Apr 2021 16:25:39 -0700 Saeed Mahameed wrote:
> +static void get_inner_ipproto(struct sk_buff *skb, struct sec_path *sp)
> +{
> +	const struct ethhdr *eth;
> +
> +	if (!skb->inner_protocol)
> +		return;
> +
> +	if (skb->inner_protocol_type == ENCAP_TYPE_IPPROTO) {
> +		sp->inner_ipproto = skb->inner_protocol;
> +		return;
> +	}
> +
> +	if (skb->inner_protocol_type != ENCAP_TYPE_ETHER)
> +		return;
> +
> +	eth = (struct ethhdr *)skb_inner_mac_header(skb);
> +
> +	switch (eth->h_proto) {
> +	case ntohs(ETH_P_IPV6):
> +		sp->inner_ipproto = inner_ipv6_hdr(skb)->nexthdr;
> +		break;
> +	case ntohs(ETH_P_IP):
> +		sp->inner_ipproto = inner_ip_hdr(skb)->protocol;
> +		break;
> +	default:
> +		return;
> +	}
> +}

Bunch of sparse warnings here, please check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ