netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Thomas Graf <tgraf@suug.ch>
Cc: greearb@candelatech.com, netdev@oss.sgi.com
Subject: Re: af_packet.c bug?
Date: Thu, 31 Mar 2005 20:59:48 -0800	[thread overview]
Message-ID: <20050331205948.0a7477af.davem@davemloft.net> (raw)
In-Reply-To: <20050328195557.GF3086@postel.suug.ch>

On Mon, 28 Mar 2005 21:55:57 +0200
Thomas Graf <tgraf@suug.ch> wrote:

> * Ben Greear <424858D4.8060604@candelatech.com> 2005-03-28 11:19
> > 
> > What is the '13' doing here?  Maybe it should be IFNAMSIZ?
> > 
> > 	/*
> > 	 *	Find the device first to size check it
> > 	 */
> > 
> > 	saddr->spkt_device[13] = 0;
> > 	dev = dev_get_by_name(saddr->spkt_device);
> > 	err = -ENODEV;
> > 	if (dev == NULL)
> > 		goto out_unlock;
> 
> Seems so, please adopt the size of spkt_device in struct sockaddr_pkt
> as well if you change it, it's currently hardcoded as 14.

No can do, that structure is exported to userspace.
Thus, changing it from 14 to IFNAMESZ (which is 16) will
break stuff.

      parent reply	other threads:[~2005-04-01  4:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28 19:19 af_packet.c bug? Ben Greear
2005-03-28 19:55 ` Thomas Graf
2005-03-28 20:08   ` Ben Greear
2005-03-28 20:17     ` Thomas Graf
2005-03-28 20:33       ` Ben Greear
2005-03-28 20:18     ` David S. Miller
2005-03-28 20:30       ` Ben Greear
2005-03-28 20:33         ` David S. Miller
2005-04-01  4:59   ` David S. Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050331205948.0a7477af.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=greearb@candelatech.com \
    --cc=netdev@oss.sgi.com \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).