search for: cfg_local_port

Displaying 8 results from an estimated 8 matches for "cfg_local_port".

2010 Apr 26
1
valgrind ipconfig work
...en = 0, - .msg_flags = 0 - }; int i, len = 0; + struct msghdr msg; + + memset(&sll, 0, sizeof(sll)); + + msg.msg_name = &sll; + msg.msg_namelen = sizeof(sll); + msg.msg_iov = iov; + msg.msg_iovlen = iov_len; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; if (cfg_local_port != LOCAL_PORT) { ipudp_hdrs.udp.source = htons(cfg_local_port);
2010 Aug 24
0
[PATCH]: Exiting -1 if dhcp client failed
..."Linux ipconfig"); + /* Reseting the exit code to 0*/ + err=0; + do { c = getopt(argc, argv, "c:d:i:onp:t:"); if (c == EOF) -802,8 +807,8 @@ int ipconfig_main(int argc, char *argv[]) "dest to %d\n", cfg_local_port, cfg_remote_port); } - loop(); + err=loop(); } - return 0; + return err; } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.zytor.com/pipermail/klibc/attachments/20100824/2d8e42eb/attachment.html>
2009 Jan 15
1
Bug#511959: klibc-utils: ipconfig times out when several machines boot at the very same time
...e other dhcp clients (be it DISCOVER or REQUEST) and from that point on, receive nothing else. Now, looking at the code (under usr/kinit/ipconfig for those following at home): packet.c: packet_recv() | ? | if (udp->source != htons(cfg_remote_port) || | udp->dest != htons(cfg_local_port)) | goto free_pkt; | ? | free_pkt: | free(ip); | return 0; | ? Which means in case of source/dest mismatch (which is the case when a message from another client is received), 0 is returned. Now, looking at the callers: bootp_proto.c: bootp_recv_reply() & dhcp_p...
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...llen = 0, - .msg_flags = 0 - }; + struct msghdr msg; int i, len = 0; + memset(&sll, 0, sizeof(sll)); + msg.msg_name = &sll; + msg.msg_namelen = sizeof(sll); + msg.msg_iov = iov; + msg.msg_iovlen = iov_len; + msg.msg_control = NULL; + msg.msg_controllen = 0; + msg.msg_flags = 0; + if (cfg_local_port != LOCAL_PORT) { ipudp_hdrs.udp.source = htons(cfg_local_port); ipudp_hdrs.udp.dest = htons(cfg_remote_port); commit 617cba04b94cae042f71eb37c0a620587783a660 Author: Mike Waychison <mikew at google.com> Date: Mon Jun 7 16:30:34 2010 -0700 [klibc] Add ancillary data structures an...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...200180109f2d 100644 --- a/usr/kinit/ipconfig/packet.c +++ b/usr/kinit/ipconfig/packet.c @@ -1,3 +1,4 @@ +#include <errno.h>/*XXX*/ /* * Packet socket handling glue. */ @@ -20,17 +21,13 @@ #include "netdev.h" #include "packet.h" -static int pkt_fd = -1; - uint16_t cfg_local_port = LOCAL_PORT; uint16_t cfg_remote_port = REMOTE_PORT; -int packet_open(void) +int packet_open(struct netdev *dev) { - int fd, one = 1; - - if (pkt_fd != -1) - return pkt_fd; + struct sockaddr_ll sll; + int fd, rv, one = 1; /* * Get a PACKET socket for IP traffic. @@ -48,18 +45,28 @@ int...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...73a..2001801 100644 --- a/usr/kinit/ipconfig/packet.c +++ b/usr/kinit/ipconfig/packet.c @@ -1,3 +1,4 @@ +#include <errno.h>/*XXX*/ /* * Packet socket handling glue. */ @@ -20,17 +21,13 @@ #include "netdev.h" #include "packet.h" -static int pkt_fd = -1; - uint16_t cfg_local_port = LOCAL_PORT; uint16_t cfg_remote_port = REMOTE_PORT; -int packet_open(void) +int packet_open(struct netdev *dev) { - int fd, one = 1; - - if (pkt_fd != -1) - return pkt_fd; + struct sockaddr_ll sll; + int fd, rv, one = 1; /* * Get a PACKET socket for IP traffic. @@ -48,18 +45,28 @@ int...
2010 Aug 25
0
[patch] ipconfig fixes + run-init nit
...pconfig_main(int argc, char *argv[]) { struct netdev *dev; int c, port; - int err; + int err = 0; /* If progname is set we're invoked from another program */ if (!progname) { @@ -802,8 +803,8 @@ int ipconfig_main(int argc, char *argv[]) "dest to %d\n", cfg_local_port, cfg_remote_port); } - loop(); + err = loop(); } - return 0; + return err; } commit 8a9b80da8295a8b21a4de44840a36aab72654a5b Author: Michael Prokop <mika at debian.org> Date: Tue Aug 24 18:04:40 2010 +0200 [klibc] ipconfig fix dns domain I'm trying to boot a KVM...
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of klibc. Ben. Ben Hutchings (1): [klibc] run-init: Add dry-run mode Jay Vosburgh (1): [klibc] ipconfig: Use separate sockets for DHCP from multiple interfaces Mathieu Trudel-Lapierre (1): [klibc] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER YunQiang Su (1): [klibc] mips: setjmp.S: don't