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: <1416516104.8629.39.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 20 Nov 2014 12:41:44 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Cong Wang <cwang@...pensource.com>
Cc:	Wengang <wen.gang.wang@...cle.com>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] bonding: clear header_ops when last slave detached (v2)

On Thu, 2014-11-20 at 09:34 -0800, Cong Wang wrote:

> I didn't look into ipoib_header_ops, thought it might have some dependency
> on symbols.

I did look before answering and suggesting this, you really should do
the same instead of giving advices of over engineering the stack.

Best is the enemy of the good.

Its hard to find some networking function trivial than this one.


static int ipoib_hard_header(struct sk_buff *skb,
                             struct net_device *dev,
                             unsigned short type,
                             const void *daddr, const void *saddr, unsigned len)
{
        struct ipoib_header *header;
        struct ipoib_cb *cb = ipoib_skb_cb(skb);

        header = (struct ipoib_header *) skb_push(skb, sizeof *header);

        header->proto = htons(type);
        header->reserved = 0;

        /*
         * we don't rely on dst_entry structure,  always stuff the
         * destination address into skb->cb so we can figure out where
         * to send the packet later.
         */
        memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN);

        return sizeof *header;
}


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