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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Jun 2013 17:20:53 -0700
From:	Jesse Gross <jesse@...ira.com>
To:	Pravin B Shelar <pshelar@...ira.com>
Cc:	netdev <netdev@...r.kernel.org>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [ovs-dev] [PATCH net-next 06/12] ip_tunnel: push generic protocol
 handling to ip_tunnel module.

On Thu, Jun 13, 2013 at 11:24 AM, Pravin B Shelar <pshelar@...ira.com> wrote:
>  static int gre_cisco_rcv(struct sk_buff *skb)
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index b7b8d15..c41faf8 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -442,23 +435,6 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
>                 tunnel->i_seqno = ntohl(tpi->seq) + 1;
>         }
>
> -       /* Warning: All skb pointers will be invalidated! */
> -       if (tunnel->dev->type == ARPHRD_ETHER) {
> -               if (!pskb_may_pull(skb, ETH_HLEN)) {
> -                       tunnel->dev->stats.rx_length_errors++;
> -                       tunnel->dev->stats.rx_errors++;
> -                       goto drop;
> -               }
> -
> -               iph = ip_hdr(skb);
> -               skb->protocol = eth_type_trans(skb, tunnel->dev);
> -               skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
> -       }
> -
> -       skb->pkt_type = PACKET_HOST;
> -       __skb_tunnel_rx(skb, tunnel->dev);
> -
> -       skb_reset_network_header(skb);
>         err = IP_ECN_decapsulate(iph, skb);
>         if (unlikely(err)) {
>                 if (log_ecn_error)
> @@ -477,6 +453,12 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
>         tstats->rx_bytes += skb->len;
>         u64_stats_update_end(&tstats->syncp);
>
> +       if (tunnel->dev->type == ARPHRD_ETHER) {
> +               skb->protocol = eth_type_trans(skb, tunnel->dev);
> +               skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
> +       } else {
> +               skb->dev = tunnel->dev;
> +       }

Why don't we set the tunnel device in the case of an L2 packet? This
appears related to the removal of __skb_tunnel_rx() but it seems there
is now less consistency between L2 and L3 tunnels.
--
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