search for: inaddr_any

Displaying 20 results from an estimated 73 matches for "inaddr_any".

Did you mean: in6addr_any
2016 Mar 21
0
[PATCH 0/1] ipconfig DHCP bug
....debian.tar.xz It would be nice if it is correctly fixed upstream. as this bug affects lot of distros. Basically the function dhcp_send() at dhcp_proto.c mistakenly define bootp.yiaddr = dev->ip_addr; when in a client originated DHCP DHCPREQUEST(RFC2131 Page 36) it should be bootp.yiaddr = INADDR_ANY; // "0" and also it forgets to define the flags bootp.flags = htons(0x800); Best, Patrick Signed-off-by: Patrick Masotta <masottaus at yahoo.com> --- diff -uprN a/klibc-2.0.4/usr/kinit/ipconfig/dhcp_proto.c b/klibc-2.0.4/usr/kinit/ipconfig/dhcp_proto.c --- a/klibc-2.0.4/usr/k...
2003 Jul 12
5
jails, ipfilter & stunnel
I'm setting up a server where I plan to use Jails to improve security I also have installed and am configuring ipfilter. Here are my questions: Because I'm using Jails, I will have to have multiple ip aliases on the network interface. I will use ipfilter to specify what can go to each of the addresses. (e.g., allow only incoming to port 80 on the jail running apache). Another
2017 Dec 19
0
[PATCH] Implement classless static routes
.../usr/kinit/ipconfig/netdev.c @@ -88,23 +88,40 @@ static void set_s_addr(struct sockaddr *saddr, uint32_t ipaddr) memcpy(saddr, &sin, sizeof sin); } -int netdev_setdefaultroute(struct netdev *dev) +int netdev_setroutes(struct netdev *dev) { struct rtentry r; - if (dev->ip_gateway == INADDR_ANY) - return 0; - - memset(&r, 0, sizeof(r)); - - set_s_addr(&r.rt_dst, INADDR_ANY); - set_s_addr(&r.rt_gateway, dev->ip_gateway); - set_s_addr(&r.rt_genmask, INADDR_ANY); - r.rt_flags = RTF_UP | RTF_GATEWAY; - - if (ioctl(cfd, SIOCADDRT, &r) == -1 && errno != EEXIST) {...
2018 Jun 12
0
[PATCH v2] Implement classless static routes
...; #include <net/if.h> @@ -88,23 +89,48 @@ static void set_s_addr(struct sockaddr *saddr, uint32_t ipaddr) memcpy(saddr, &sin, sizeof sin); } -int netdev_setdefaultroute(struct netdev *dev) +int netdev_setroutes(struct netdev *dev) { struct rtentry r; - if (dev->ip_gateway == INADDR_ANY) - return 0; - - memset(&r, 0, sizeof(r)); - - set_s_addr(&r.rt_dst, INADDR_ANY); - set_s_addr(&r.rt_gateway, dev->ip_gateway); - set_s_addr(&r.rt_genmask, INADDR_ANY); - r.rt_flags = RTF_UP | RTF_GATEWAY; - - if (ioctl(cfd, SIOCADDRT, &r) == -1 && errno != EEXIST) {...
2019 Jan 18
0
[klibc:master] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER
.../usr/kinit/ipconfig/dhcp_proto.c index ebf79cc..d5b759b 100644 --- a/usr/kinit/ipconfig/dhcp_proto.c +++ b/usr/kinit/ipconfig/dhcp_proto.c @@ -201,8 +201,14 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec) bootp.hlen = dev->hwlen; bootp.xid = dev->bootp.xid; bootp.ciaddr = INADDR_ANY; - bootp.yiaddr = dev->ip_addr; + /* yiaddr should always be set to 0 for the messages we're likely + * to send as a DHCP client: DHCPDISCOVER, DHCPREQUEST, DHCPDECLINE, + * DHCPINFORM, DHCPRELEASE + * cf. RFC2131 section 4.1.1, table 5. + */ + bootp.yiaddr = INADDR_ANY; bootp.giaddr =...
2009 Apr 18
0
Freelancer - multiplayer lag
...list, which makes it quite unplayable. The output of the console when it starts lagging (WINEDEBUG=warn+all) Code: fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (28000002) fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (98000007) warn:winsock:WS_bind Trying to bind to magic IP address, using INADDR_ANY instead. fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (28000002) fixme:winsock:WSAIoctl unsupported WS_IOCTL cmd (98000007) warn:winsock:WS_bind Trying to bind to magic IP address, using INADDR_ANY instead. warn:winsock:WS_bind failure - errno = 98 warn:winsock:wsaErrno errno 98, (Address alrea...
2019 Jan 18
0
[klibc:master] ipconfig: Implement classless static routes
.../usr/kinit/ipconfig/netdev.c @@ -88,23 +88,44 @@ static void set_s_addr(struct sockaddr *saddr, uint32_t ipaddr) memcpy(saddr, &sin, sizeof sin); } -int netdev_setdefaultroute(struct netdev *dev) +int netdev_setroutes(struct netdev *dev) { struct rtentry r; - if (dev->ip_gateway == INADDR_ANY) - return 0; - - memset(&r, 0, sizeof(r)); - - set_s_addr(&r.rt_dst, INADDR_ANY); - set_s_addr(&r.rt_gateway, dev->ip_gateway); - set_s_addr(&r.rt_genmask, INADDR_ANY); - r.rt_flags = RTF_UP | RTF_GATEWAY; - - if (ioctl(cfd, SIOCADDRT, &r) == -1 && errno != EEXIST) {...
2018 Jun 18
1
[PATCH v3 1/2] Implement classless static routes
.../usr/kinit/ipconfig/netdev.c @@ -88,23 +88,44 @@ static void set_s_addr(struct sockaddr *saddr, uint32_t ipaddr) memcpy(saddr, &sin, sizeof sin); } -int netdev_setdefaultroute(struct netdev *dev) +int netdev_setroutes(struct netdev *dev) { struct rtentry r; - if (dev->ip_gateway == INADDR_ANY) - return 0; - - memset(&r, 0, sizeof(r)); - - set_s_addr(&r.rt_dst, INADDR_ANY); - set_s_addr(&r.rt_gateway, dev->ip_gateway); - set_s_addr(&r.rt_genmask, INADDR_ANY); - r.rt_flags = RTF_UP | RTF_GATEWAY; - - if (ioctl(cfd, SIOCADDRT, &r) == -1 && errno != EEXIST) {...
2011 Aug 07
2
[PATCH] kinit minor checkpatch cleanup
....c b/usr/kinit/nfsroot.c index b5ab3bb..3b80773 100644 --- a/usr/kinit/nfsroot.c +++ b/usr/kinit/nfsroot.c @@ -56,9 +56,8 @@ int mount_nfs_root(int argc, char *argv[], int flags) dev_bootpath = dev->bootpath; break; } - if (dev->ip_addr != INADDR_NONE && dev->ip_addr != INADDR_ANY) { + if (dev->ip_addr != INADDR_NONE && dev->ip_addr != INADDR_ANY) client = dev->ip_addr; - } } /* @@ -107,6 +106,6 @@ int mount_nfs_root(int argc, char *argv[], int flags) goto done; } - done: +done: return ret; } -- 1.7.5.4
2010 Mar 16
4
ipconfig: DHCP fixes
Hi, Here are two fixes for ipconfig/dhcp, the second of them being required for my dhcp3 server to accept ipconfig's requests. Thanks, Louis Louis Rilling (2): ipconfig: Fix missing dhcp_end field ipconfig: Fix null ciaddr on DHCPREQUEST during SELECTING state usr/kinit/ipconfig/dhcp_proto.c | 4 ++-- usr/kinit/ipconfig/packet.c | 2 +- 2 files changed, 3
2006 Feb 05
2
R socket communication
...usr/bin/perl -w use strict; use Socket; my $port = shift || 7890; my $proto = getprotobyname('tcp'); socket(SERVER, PF_INET, SOCK_STREAM, $proto) or die "socket: $!"; setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, 1) or die "setsock: $!"; my $paddr = sockaddr_in($port, INADDR_ANY); bind(SERVER, $paddr) or die "bind: $!"; listen(SERVER, SOMAXCONN) or die "listen: $!"; print "SERVER started on port $port "; my $client_addr; while ($client_addr = accept(CLIENT, SERVER)) { my ($client_port, $client_ip) = sockaddr_in($client_addr); my $client_ipnu...
2003 Jul 30
1
portmap, bind(), and NIS
...d very much *not* want to be accessible on some of its interfaces. portmap can be instructed to bind to specific addresses using the -h flag, but this seems to break ypbind. ypbind will attempt to find a server by issuing a broadcast rpc request to the local network. When portmap is not bound to INADDR_ANY, it will not reply to these requests. I'd rather not have to run ypset on clients where this condition exists with their local NIS servers, and I'd really like to not have portmap bound on certain interfaces. I could filter it of course, but I was hoping someone had another option that th...
2009 Mar 11
1
ciaddr in dhcp_proto.c
...According to rfc 2131, page 9: "ciaddr Client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ARP requests. " Is it ideal to change "boot.ciaddr = dev-> ip_addr" to "boot.ciaddr = INADDR_ANY" in dhcp_send() function? I've used a TP-LINK TL-R402M router and it will give a DHCPNAK if ciaddr is not empty.
2011 Jun 08
1
[PATCH] Don't try to guess the nameserver in ipconfig.
...a/usr/kinit/ipconfig/main.c +++ b/usr/kinit/ipconfig/main.c @@ -176,11 +176,6 @@ static void postprocess_device(struct netdev *dev) printf("IP-Config: %s guessed broadcast address %s\n", dev->name, my_inet_ntoa(dev->ip_broadcast)); } - if (dev->ip_nameserver[0] == INADDR_ANY) { - dev->ip_nameserver[0] = dev->ip_server; - printf("IP-Config: %s guessed nameserver address %s\n", - dev->name, my_inet_ntoa(dev->ip_nameserver[0])); - } } static void complete_device(struct netdev *dev) -- 1.7.1
2001 Nov 20
3
solaris and Remote Port Forwarding
...a machine I can telnet to localhost on the forwarded port, but connecting to the remote host on the forwarded port from another host doesn't work. netstat -a reveils: localhost.4000 *.* 0 0 0 0 LISTEN so it is still just binding to localhost instead of INADDR_ANY. p.s. This first test was on Solaris 2.6 sparc, and I am about to rebuild on Solaris 7 and 8, but I don't expect different results. -- David F. Newman UNIX Administrator dnewman at maraudingpirates.org
2008 Feb 28
1
C Code to connect to Asterisk Manager Interface
...eraddr, sizeof(serveraddr)); serveraddr.sin_family = AF_INET; serveraddr.sin_addr.s_addr = inet_addr(SERVER_ADDRESS); serveraddr.sin_port = htons(SERVER_PORT); bzero((char *) &clientaddr, sizeof(clientaddr)); clientaddr.sin_family = AF_INET; clientaddr.sin_addr.s_addr = INADDR_ANY; clientaddr.sin_port = htons(CLIENT_PORT); sd = socket(AF_INET, SOCK_STREAM, 0); printf("\nCreated socket ..."); bind(sd,(struct sockaddr *) &clientaddr, sizeof(clientaddr)); printf("\nBinding successful ..."); connect(sd,(struct sockaddr *) &s...
2005 Jan 05
1
[PATCH] kinit/nfsmount.c path from bootp
...if ((opts = strchr(path, ',')) != NULL) { - *opts++ = '\0'; - argv[a++] = (char *) "-o"; - argv[a++] = opts; - } - for (dev = ifaces; dev; dev = dev->next) { print_device_config(dev); if (dev->ip_server != INADDR_NONE && dev->ip_server != INADDR_ANY) { addr.s_addr = dev->ip_server; client = dev->ip_addr; + dev_bootpath = dev->bootpath; break; } if (dev->ip_addr != INADDR_NONE && @@ -102,6 +89,25 @@ } } + /* + * if the "nfsroot" option is set then it overrides + * bootpath supplied by t...
2003 Aug 19
1
kqueue freezing 5.1R on kevent call
...M, 0 ); /* NOTE: None of this bind() and listen() code is necessary for the crash, * I'm including it to show the crash in 'normal operation' */ memset( &addr, 0, sizeof( addr )); addr.sin_family = AF_INET; addr.sin_port = htons( 3456 ); addr.sin_addr.s_addr = INADDR_ANY; if( bind( sock, (struct sockaddr *) &addr, sizeof( addr )) < 0 ) { perror( "bind" ); exit( 1 ); } if( listen( sock, 32 ) < 0 ) { perror( "listen" ); exit( 1 ); } /* Must add the socket to the kqueue for it to crash */ events[...
2023 Aug 05
2
Question on simultaneous IPv4 and IPv6 "any address" listening
Cheers all, TL;DR version: I've recently found that at least on my test box the `LISTEN *` line had only set up an IPv4 `0.0.0.0` listener but not an IPv6 `::0` listener for `upsd`. In fact, at least on a "dual-stack" system, it seems impossible to bind to both - so depending on binding order I either lose IPv6 or lose IPv4 directly (but have it practically as IPv4-over-IPv6).
2023 Aug 05
2
Question on simultaneous IPv4 and IPv6 "any address" listening
Cheers all, TL;DR version: I've recently found that at least on my test box the `LISTEN *` line had only set up an IPv4 `0.0.0.0` listener but not an IPv6 `::0` listener for `upsd`. In fact, at least on a "dual-stack" system, it seems impossible to bind to both - so depending on binding order I either lose IPv6 or lose IPv4 directly (but have it practically as IPv4-over-IPv6).