Ticket #6 (closed defect: invalid)

Opened 3 years ago

Last modified 4 months ago

(Address already in use)

Reported by: sebastian.serrano at google mail Owned by: marek
Priority: normal Milestone: 0.2 alpha
Component: gateway Version: batman
Severity: blocker Keywords:
Cc:

Description

I get batman-III 0.2 alpha from svn for testing over a debian etch when i run it it immediately stop without any error.

Making a strace i see that it stop for the following error:

bind(4, {sa_family=AF_INET, sin_port=htons(1966), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)

i running it with the following parameters: ./batmand -a 10.100.0.0/24 -d 1 -o 2000 -g 0 -r 0 ath0

strace context of stop: write(1, "B.A.T.M.A.N.-III v0.2 alpha (deb"..., 60B.A.T.M.A.N.-III v0.2 alpha (debug) (compability version 2) ) = 60 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 ioctl(4, SIOCGIFADDR, {ifr_name="br0", ifr_addr={AF_INET, inet_addr("192.168.1.254")}}) = 0 ioctl(4, SIOCGIFBRDADDR, {ifr_name="br0", ifr_broadaddr={AF_INET, inet_addr("0.0.0.0")}}) = 0 setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1919025153], 4) = 0 setsockopt(3, SOL_SOCKET, SO_BINDTODEVICE, [3175010], 4) = 0 bind(3, {sa_family=AF_INET, sin_port=htons(1966), sin_addr=inet_addr("192.168.1.254")}, 16) = 0 setsockopt(4, SOL_SOCKET, SO_BINDTODEVICE, [3175010], 4) = 0 bind(4, {sa_family=AF_INET, sin_port=htons(1966), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use) close(4) = 0 close(3) = 0 unlink("/var/run/batmand.socket") = -1 ENOENT (No such file or directory) munmap(0xb7fab000, 4096) = 0 exit_group(1) = ?

Attachments

batman.strace.log (4.2 kB) - added by anonymous 3 years ago.

Change History

Changed 3 years ago by anonymous

Changed 3 years ago by marek

  • owner changed from somebody to marek
  • status changed from new to assigned

Thanks for your bugreport and the strace output. It looks like you misconfigured your interface: You are using a broadcast address of "0.0.0.0". See line 52 of your strace log: "ifr_broadaddr={AF_INET, inet_addr("0.0.0.0")}". Actually, we can't "fix" that in batman other than implementing a warning about that. Can you confirm my guess ? :-)

Changed 3 years ago by sebastian.serrano at google mail

  • status changed from assigned to closed
  • resolution set to invalid

Hi

i have configured ath0 using:

ip addr add 192.168.2.1/24 dev ath0

it has work fine always, but now looking at the output of ifconfig broadcast is set as 0.0.0.0 Now batman is running. Thanks

PD: Some error message would by nice :)

### BEFORE # ifconfig ath0 ath0 Link encap:Ethernet HWaddr 00:20:A6:54:24:D6

inet addr:192.168.2.1 Bcast:0.0.0.0 Mask:255.255.255.0 inet6 addr: fe80::220:a6ff:fe54:24d6/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

# ip a ls dev ath0 7: ath0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue

link/ether 00:20:a6:54:24:d6 brd ff:ff:ff:ff:ff:ff inet 192.168.2.1/24 scope global ath0 inet6 fe80::220:a6ff:fe54:24d6/64 scope link

valid_lft forever preferred_lft forever

### NOW # ip a a 192.168.2.1/24 broadcast 192.168.2.255 dev ath0 # ifconfig ath0 ath0 Link encap:Ethernet HWaddr 00:20:A6:54:24:D6

inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

Note: See TracTickets for help on using tickets.