diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 19:53:15 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 19:53:15 +0200 |
commit | d6a5476ee7af464a381bbeeec576ee58f3650a43 (patch) | |
tree | c19d8dab5fe71ad76f3d0f7698afc1300bf3443c /source3/nmbd | |
parent | 55fd6b125c3e5ac135d124c291f5ae6102fcbb2f (diff) | |
download | samba-d6a5476ee7af464a381bbeeec576ee58f3650a43.tar.gz samba-d6a5476ee7af464a381bbeeec576ee58f3650a43.tar.bz2 samba-d6a5476ee7af464a381bbeeec576ee58f3650a43.zip |
Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_subnetdb.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 28de212d69..adc331cc3e 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -219,7 +219,7 @@ static void reload_interfaces(time_t t) * ignore it here. JRA. */ - if (is_loopback_addr(&iface->ip)) { + if (is_loopback_addr((struct sockaddr *)&iface->ip)) { DEBUG(2,("reload_interfaces: Ignoring loopback " "interface %s\n", print_sockaddr(str, sizeof(str), &iface->ip) )); @@ -397,7 +397,7 @@ static void msg_nmbd_send_packet(struct messaging_context *msg, } in_addr_to_sockaddr_storage(&ss, p->ip); - pss = iface_ip(&ss); + pss = iface_ip((struct sockaddr *)&ss); if (pss == NULL) { DEBUG(2, ("Could not find ip for packet from %d\n", diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 4b97819a14..66b584ad54 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -476,7 +476,7 @@ struct response_record *queue_register_name( struct subnet_record *subrec, return NULL; in_addr_to_sockaddr_storage(&ss, subrec->bcast_ip); - pss = iface_ip(&ss); + pss = iface_ip((struct sockaddr *)&ss); if (!pss || pss->ss_family != AF_INET) { p->locked = False; free_packet(p); diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 9ee0709cb5..565d81f82d 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -93,7 +93,7 @@ void process_logon_packet(struct packet_struct *p, char *buf,int len, struct in_addr ip; in_addr_to_sockaddr_storage(&ss, p->ip); - pss = iface_ip(&ss); + pss = iface_ip((struct sockaddr *)&ss); if (!pss) { DEBUG(5,("process_logon_packet:can't find outgoing interface " "for packet from IP %s\n", diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c index 225def52cc..61af0bb4a4 100644 --- a/source3/nmbd/nmbd_subnetdb.c +++ b/source3/nmbd/nmbd_subnetdb.c @@ -260,7 +260,7 @@ bool create_subnets(void) * ignore it here. JRA. */ - if (is_loopback_addr(&iface->ip)) { + if (is_loopback_addr((struct sockaddr *)&iface->ip)) { DEBUG(2,("create_subnets: Ignoring loopback interface.\n" )); continue; } |