projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b75d33d
)
Fix issue when no broadcast address is given
author
Mohamed Abbas
<mohamed.abbas@intel.com>
Thu, 8 Oct 2009 18:49:12 +0000
(11:49 -0700)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 3 Nov 2009 06:54:53 +0000
(15:54 +0900)
src/ipv4.c
patch
|
blob
|
history
diff --git
a/src/ipv4.c
b/src/ipv4.c
index
4ef6b87
..
b98d302
100644
(file)
--- a/
src/ipv4.c
+++ b/
src/ipv4.c
@@
-199,7
+199,10
@@
static int ipv4_probe(struct connman_element *element)
memset(&ipv4, 0, sizeof(ipv4));
ipv4.address.s_addr = inet_addr(address);
ipv4.netmask.s_addr = inet_addr(netmask);
memset(&ipv4, 0, sizeof(ipv4));
ipv4.address.s_addr = inet_addr(address);
ipv4.netmask.s_addr = inet_addr(netmask);
- ipv4.broadcast.s_addr = inet_addr(broadcast);
+ if (broadcast)
+ ipv4.broadcast.s_addr = inet_addr(broadcast);
+ else
+ ipv4.broadcast.s_addr = ipv4.address.s_addr | ~ipv4.netmask.s_addr;
set_ipv4(element, &ipv4, nameserver);
set_ipv4(element, &ipv4, nameserver);