diff options
author | shemminger <shemminger> | 2003-04-25 00:09:11 +0000 |
---|---|---|
committer | shemminger <shemminger> | 2003-04-25 00:09:11 +0000 |
commit | 9e8e118c2c0681534962670b644620541c704ced (patch) | |
tree | 4ef321c45152a37163693bb46cff6bad20d310ef /brctl | |
parent | 012d80f559eabaebfc0a1ac92a727263f438e08a (diff) | |
download | android_external_brctl-9e8e118c2c0681534962670b644620541c704ced.tar.gz android_external_brctl-9e8e118c2c0681534962670b644620541c704ced.tar.bz2 android_external_brctl-9e8e118c2c0681534962670b644620541c704ced.zip |
If read of bridge forwarding table fails, then print error and exit.
Diffstat (limited to 'brctl')
-rw-r--r-- | brctl/brctl_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/brctl/brctl_cmd.c b/brctl/brctl_cmd.c index 264a27d..b56b0c0 100644 --- a/brctl/brctl_cmd.c +++ b/brctl/brctl_cmd.c @@ -288,6 +288,11 @@ void br_cmd_showmacs(struct bridge *br, char *arg0, char *arg1) int num; num = br_read_fdb(br, fdb, offset, 1024); + if (num < 0) { + fprintf(stderr, "read of forward table failed\n"); + break; + } + if (!num) break; |