Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [RFC] should we care of COMPAT mode in bridge ?
Date: Mon, 06 Jun 2011 22:32:32 +0200	[thread overview]
Message-ID: <1307392352.2642.16.camel@edumazet-laptop> (raw)
In-Reply-To: <201106062226.02635.arnd@arndb.de>

Le lundi 06 juin 2011 à 22:26 +0200, Arnd Bergmann a écrit :
> On Monday 06 June 2011 22:12:54 Eric Dumazet wrote:
> > So for an old binary, compiled at the time SIOCBRADDBR wasnt there (in
> > include file I mean), we ended doing :
> > 
> >         {
> >                 char _br[IFNAMSIZ];
> >                 unsigned long arg[3]
> >                         = { BRCTL_ADD_BRIDGE, (unsigned long) _br };
> > 
> >                 strncpy(_br, brname, IFNAMSIZ);
> >                 ret = ioctl(br_socket_fd, SIOCSIFBR, arg);
> >         }
> > 
> > And this breaks on 64bit kernel
> 
> Ah, you were quicker than me at posting this ;-)
> 
> > I guess we shall add some logic in kernel to support SIOCSIFBR
> > afterall ;)
> > 
> > Thanks !
> > 
> > BTW: I confirm that compiling an up2date 32bit brctl with an up2date
> > include files is OK on 64bit kernel.
> 
> I did a little more digging in the history and found that the code in
> brctl was added in this commit:
> 
> commit 328f4711bbc369dcccf8f8cfba2adf5dd0f74479
> Author: shemminger <shemminger>
> Date:   Fri May 21 17:41:48 2004 +0000
> 
>     New version of command and library that use sysfs.
>     Update make system to build with or without sysfs.
> 
> It's not completely clear to me if it's worth supporting older
> user space than this, but it's certainly possible.
> 
> 	Arnd

In my case, I used latest bridge-utils tree, but compiled on a RHEL4
machine :)

# ls -l /usr/include/linux/sockios.h
-rw-r--r--  1 root root 5369 Mar 18  2002 /usr/include/linux/sockios.h
# rpm -qf /usr/include/linux/sockios.h
glibc-kernheaders-2.4-9.1.100.EL

Please note that pretty everything works on this 32bit distro machine,
but a 64bit kernel.




  reply	other threads:[~2011-06-06 20:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 19:45 [RFC] should we care of COMPAT mode in bridge ? Eric Dumazet
2011-06-06 20:03 ` David Miller
2011-06-06 20:23   ` Chris Friesen
2011-06-06 20:31     ` Arnd Bergmann
2011-06-06 20:31   ` Andreas Schwab
2011-06-06 20:34     ` Eric Dumazet
2011-06-07 23:51   ` Stephen Hemminger
2011-06-08  0:27     ` David Miller
2011-06-08 16:08       ` Stephen Hemminger
2011-06-06 20:06 ` Arnd Bergmann
2011-06-06 20:09   ` David Miller
2011-06-06 20:19     ` Arnd Bergmann
2011-06-06 20:23       ` David Miller
2011-06-07 23:54         ` Stephen Hemminger
2011-06-06 20:12   ` Eric Dumazet
2011-06-06 20:26     ` Arnd Bergmann
2011-06-06 20:32       ` Eric Dumazet [this message]
2011-06-06 20:33         ` Arnd Bergmann
2011-06-06 20:35           ` Eric Dumazet

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=1307392352.2642.16.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=arnd@arndb.de \
    --cc=netdev@vger.kernel.org \
    /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