| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
|/
|
|
|
|
|
|
| |
This patch adds makefiles to build this open source tool
on Android. This patch also addresses some compatibilty
issues between GNU C and bionic C implementation.
Change-Id: Ic35ab4f98d5f252d53e92c6cde43f0673cef9d4a
|
|\ |
|
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* origin/caf/kernel-bridge-utils/master: (109 commits)
Fix typo's on man page
bug with older glibc: "brctl show" shows nothing
skip . and .. in accurately in isbridge()
Check error returns from write to sysfs
Fix error message for incorrect command
Fix incorrect command in manual
Update URL of git repository
update mailing address
bridge-utils 1.5
show selected bridge
bridge-utils: Add 'hairpin' port forwarding mode
Handle unknown attributes more gracefully
Skip . and .. in foreach_bridge test
Check for fopen() failing
use proper version of install in doc/Makefile
don't install libbridge.a
fix use of sysfs (affects 32/64 bit compat)
Use linux/if.h rather than net/if.h for compatiablity with other headers.
Allow bridge-utils to run when no TCP/IP is available
Update gitignore
...
|
| |
| |
| |
| |
| | |
One missing space reported by A. Costa and always captialize
Linux.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Older glibc has a bug in scandir() where if the last call to filter
is a failure and filter sets errno, scandir() will fail and return that
errno to the caller.
If running "brctl show" on a system where the last (sorted) directory
in /sys/class/net is not a bridge, isbridge() will leave errno set to
ENOENT and trigger this bug in glibc.
Attached patch against bridge-utils v1.5 saves/restores errno in
isbridge() to workaround this bug in older glibc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hi all,
In commit f88f8 "Skip . and .. in foreach_bridge test", the code skips
all directories starting with dot.
But if we create a bridge staring with dot, e.g. `.br0`, then `brctl show`
cannot show this one.
`.br0` should not be hidden, because we cannot find it except the command
`brctl show .br0`.
Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
|
| |
| |
| |
| | |
Add helper function to check write to sysfs files.
|
| |
| |
| |
| |
| | |
Debian bug 406907
Error message was refering to incorrect command argument.
|
| |
| |
| |
| |
| | |
Command is "setageing" not "setageingtime"; fix man page.
Debian bug report.
|
| |
| |
| |
| | |
No longer uses sourceforge.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a 'hairpin' (also called 'reflective relay') mode
port configuration to the Linux Ethernet bridge utilities.
A bridge supporting hairpin forwarding mode can send frames back
out through the port the frame was received on.
Hairpin mode is required to support basic VEPA (Virtual
Ethernet Port Aggregator) capabilities.
You can find additional information on VEPA here:
http://tech.groups.yahoo.com/group/evb/
http://www.ieee802.org/1/files/public/docs2009/new-hudson-vepa_seminar-20090514d.pdf
http://www.internet2.edu/presentations/jt2009jul/20090719-congdon.pdf
(I simplified the code by handling option compatiablity
in earlier patch -- Stephen)
Signed-off-by: Paul Congdon <paul.congdon@hp.com>
Signed-off-by: Anna Fischer <anna.fischer@hp.com>
|
| |
| |
| |
| |
| | |
If utility has some new attribute, that is not in older kernel,
just assume it is zero.
|
| |
| |
| |
| |
| |
| | |
If bridge is name 'bridge' then the test for ./bridge would succeed
and eventually cause a SEGV. Correct fix is to just skip . directories
in scan.
|
| |
| |
| |
| | |
Don't just die with SEGV if fopen fails.
|
| |
| |
| |
| | |
Need to do autoconf correctly, bah on Lennart.
|
| |
| |
| |
| |
| |
| | |
Resolve some problems with make install
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I built current git head of bridge-utils.
32-bit binary omn 64-bit kernel doesn't show
bridged interfaces:
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no can't get port info: Operation not supported
It turns out that it uses wrong directory name
and falls back to using ioctls. Bridge ioctls
seems to be deprecated and 32/64 compat is missing,
thus it fails.
Attached patch makes brctl use /sys/class/net/br0/brif
instead of nonexistent /sys/class/net/br0/brport:
/sys/class/net/br0
...
...
./brif:
lrwxrwxrwx 1 root root 0 Jan 8 10:54 eth0 -> ../../../../class/net/eth0/brport
Please apply.
--
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
|
| |
| |
| |
| |
| |
| | |
other headers.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This simple patch create AF_LOCAL socket instead of AF_INET so if TCP/IP
is not linked into kernel it still works.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
| |
| |
| |
| | |
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
output is showing 0 for port_no and port_id
It seems that somewhere in 2.6 sysfs land the following items got
printed in hexadecimal, and brctl code was parsing for decimal only
doug:/sys/class/net/eth0/brport# cat port_id
0x8001
doug:/sys/class/net/eth0/brport# cat port_no
0x1
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
was more trouble than it was worth, the code is easier if
just using directories directory.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
|
| |
| |
| |
| | |
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hi!
Jens Seidel reported a bug to Debian about a wrong message on brctl, you can
see it at http://bugs.debian.org/383938, it is kind of the continuation of
the ENODEV bug #348617 that was already patched by Stephen on the git.
I have applied the same solution that Stephen applied for the first one,
follows the patch against git plus a minor exclamation mark modification I
did so that all ENODEV messages were exclamative (Stephen patch had missed
that mark).
Regards...
--
Manty/BestiaTester -> http://manty.net
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
|
| |
| |
| |
| |
| |
| |
| | |
This reverts 39af7c8f2855c3d9cb44e3069cbfeddd8979acae commit.
Better to add this functionality via ebtables rather than
into bridging code.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
some libsysfs2 internal stucts are corrupted during execution of brctl
by unneeded and erroneous calls to sysfs_close_class_device()
Long description of my troubles
On my xen Dom0 with 5 bridges and many interfaces every brctl show
invocations fails with a strange error.
bridge name bridge id STP enabled interfaces
xenbr0 8000.feffffffffff no vif1.0
peth0
vif0.0
xenbr1 8000.feffffffffff no vif3.0
vif2.0
vif1.1
peth1
vif0.1
xenbr2 8000.feffffffffff no vif1.2
peth2
vif0.2
xenbr3 8000.feffffffffff no can't get port info: No such device
xenbr4 8000.feffffffffff no vif2.2
peth4
vif0.4
but xenbr3 was fully up and functional, as stated by the contents of
/sys/class/net/xenbr3 directory.
Investigating with strace i've found that brctl give this error
because it is trying to read xenbr3 interfaces in
/sys/class/net/eth0/brif directory!
.....
lstat64("/sys/class/net/xenbr3/bridge/topology_change_detected", {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
stat64("/sys/class/net/xenbr3/bridge/topology_change_detected", {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0
open("/sys/class/net/xenbr3/bridge/topology_change_detected", O_RDONLY) = 4
read(4, "0\n", 4096) = 2
close(4) = 0
open("/sys/class/net/eth0/brif", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
ioctl(3, SIOCDEVPRIVATE, 0xafdec36c) = -1 ENODEV (No such device)
write(1, "8000.feffffffffff\tno\t\t can\'t get"..., 59) = 59
lstat64("/sys/class/net/xenbr4/bridge", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
write(1, "xenbr4\t\t", 8) = 8
.....
after some gdb and documentation reading sessions i've discovered that
all calls to sysfs_close_class_device() in libbridge code are wrong,
because their arguments are pointers returned by sysfs_get_*
functions. This is explicitly forbidden by libsysfs documentation[1]
at 6.1.b and corrupt libsysfs internal structures freeing memory that
still being used.
[1] /usr/share/doc/libsysfs-dev/libsysfs.txt.gz
.....
6.1 Calling Conventions in Libsysfs
-----------------------------------
Libsysfs uses a simple API calling convention. APIs are classified to be
one of "open", "get", "close" types. The convention is as follows:
a. All "open" APIs have a corresponding "close" API.
b. References obtained using "get" calls should not be closed
explicitly.
c. All "opened" references have to be closed with a call to
their corresponding "close" call. This takes care of
freeing structure references obtained with "get" calls.
.....
I have checked all other sysfs_close_* calls and they seem to be
correct.
Attached patch removes the wrong call, so i can operate correctly on
my bridges.
|
| |
| |
| |
| | |
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348617
|
| |
| |
| |
| | |
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=296881
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
of libsysfs
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
from API, and display output.
Fix foreach_port for case when /sys is missing (but compiled for sysfs).
|
| | |
|
| | |
|
| | |
|
| | |
|