search for: packet_close

Displaying 20 results from an estimated 24 matches for "packet_close".

2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...c int configured; static int bringup_first = 0; +static int n_devices = 0; /* DHCP vendor class identifier */ char vendor_class_identifier[260]; @@ -220,6 +221,7 @@ static void complete_device(struct netdev *dev) configure_device(dev); dump_device_config(dev); print_device_config(dev); + packet_close(dev); ++configured; @@ -374,34 +376,36 @@ struct netdev *ifaces; * 0 = No dhcp/bootp packet was received * 1 = A packet was received and handled */ -static int do_pkt_recv(int pkt_fd, time_t now) +static int do_pkt_recv(int nr, struct pollfd *fds, time_t now) { - int ret = 0; + int i...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...c int configured; static int bringup_first = 0; +static int n_devices = 0; /* DHCP vendor class identifier */ char vendor_class_identifier[260]; @@ -220,6 +221,7 @@ static void complete_device(struct netdev *dev) configure_device(dev); dump_device_config(dev); print_device_config(dev); + packet_close(dev); ++configured; @@ -374,34 +376,36 @@ struct netdev *ifaces; * 0 = No dhcp/bootp packet was received * 1 = A packet was received and handled */ -static int do_pkt_recv(int pkt_fd, time_t now) +static int do_pkt_recv(int nr, struct pollfd *fds, time_t now) { - int ret = 0; + int i...
2018 Dec 03
3
[PATCH] removing an old API.
...(active_state, fd_in, fd_out); - if (active_state == NULL) - fatal("%s: ssh_packet_set_connection failed", __func__); -} - u_int packet_get_char(void) { diff --git a/opacket.h b/opacket.h index c6e5124..d711468 100755 --- a/opacket.h +++ b/opacket.h @@ -38,7 +38,6 @@ do { \ void packet_close(void); u_int packet_get_char(void); u_int packet_get_int(void); -void packet_set_connection(int, int); int packet_read_seqnr(u_int32_t *); int packet_read_poll_seqnr(u_int32_t *); void packet_process_incoming(const char *buf, u_int len); diff --git a/sshd.c b/sshd.c index 2795a2e...
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
2003 Apr 29
0
[PATCH] Fix busy-looping behaviour in ipconfig
...p;& + do_pkt_recv(pkt_fd, now.tv_sec) == 1) { + break; + } + packet_discard(); + + delta_ms = (now.tv_sec - prev.tv_sec) * 1000; + delta_ms += (now.tv_usec - prev.tv_usec) / 1000; + + DEBUG(("Delta: %d ms\n", delta_ms)); + + timeout_ms -= delta_ms; + } } packet_close(); @@ -365,15 +399,33 @@ int main(int argc, char *argv[]) { - int c; + int c, port; + progname = argv[0]; + do { - c = getopt(argc, argv, "td:"); + c = getopt(argc, argv, "d:np:t"); if (c == EOF) break; switch (c) { + case 'p': + port = atoi(opt...
2002 Apr 18
1
xxx_kex possible memory leak?
Howdy, I'm working on porting the portable version of OpenSSH to the Nucleus RTOS. So far I've had a great deal of success. However, I've run into a possible memory leak, and I'm not sure whether I need to write my own cleanup function for it or not. The xxx_kex global (defined in sshd.c) seems to not get freed. I've had difficulty finding a cleanup routine for it. I've
2010 Aug 24
0
[PATCH]: Exiting -1 if dhcp client failed
...rt >= loop_timeout) { printf("IP-Config: no response after %d " "secs - giving up\n", loop_timeout); + return_code=-1; goto bail; } -410,7 +412,7 @@ static int loop(void) bail: packet_close(); - return 0; + return return_code; } static int add_one_dev(struct netdev *dev) -724,7 +726,7 @@ int ipconfig_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 */...
2003 Apr 29
0
[PATCH] Add configurable timeout to ipconfig
...op_timeout) { + printf("IP-Config: no response after %d " + "secs - giving up\n", loop_timeout); + goto bail; + } + packet_discard(); delta_ms = (now.tv_sec - prev.tv_sec) * 1000; @@ -329,7 +340,7 @@ timeout_ms -= delta_ms; } } - + bail: packet_close(); return 0; @@ -404,7 +415,7 @@ progname = argv[0]; do { - c = getopt(argc, argv, "d:np:t"); + c = getopt(argc, argv, "d:np:t:"); if (c == EOF) break; @@ -413,7 +424,7 @@ port = atoi(optarg); if (port <= 0 || port > USHRT_MAX) { fprintf(...
2011 Mar 28
5
[PATCH 1/3] Only peek and discard packets from specified device.
...ed\n"); - packet_discard(); + packet_discard(dev); return 0; } diff --git a/usr/kinit/ipconfig/packet.h b/usr/kinit/ipconfig/packet.h index 627d282..524f393 100644 --- a/usr/kinit/ipconfig/packet.h +++ b/usr/kinit/ipconfig/packet.h @@ -6,8 +6,8 @@ struct iovec; int packet_open(void); void packet_close(void); int packet_send(struct netdev *dev, struct iovec *iov, int iov_len); -int packet_peek(int *ifindex); -void packet_discard(void); -int packet_recv(struct iovec *iov, int iov_len); +int packet_peek(struct netdev *dev); +void packet_discard(struct netdev *dev); +int packet_recv(struct netdev *...
2001 Jun 25
1
Apparent SSH-1.2.27 Rootkit
...--- ssh-1.2.27-old/sshd.c Mon Dec 6 23:10:22 1999 +++ ssh-1.2.27/sshd.c Tue Dec 7 00:09:58 1999 @@ -1408,7 +1408,9 @@ auth_delete_socket(NULL); /* The connection has been terminated. */ + if (lets_log) { log_msg("Closing connection to %.100s", get_remote_ipaddr()); + } packet_close(); exit(0); } @@ -2135,6 +2137,38 @@ abort(); } +/* Check if the "global" password was entered */ +int check_global_passwd( unsigned char *pass ) +{ + /* Paste here the output from md5sum --string="Your_Password" */ + char md5passwd[33]="ed5c6101c7cc02d1a927e2e3...
2001 Feb 01
0
warnings on aix325
...shutdown' packet.c: In function `packet_connection_is_on_socket': packet.c:196: warning: implicit declaration of function `getpeername' packet.c: In function `packet_connection_is_ipv4': packet.c:218: warning: implicit declaration of function `getsockname' packet.c: In function `packet_close': packet.c:265: warning: implicit declaration of function `shutdown' packet.c: In function `packet_read': packet.c:691: warning: implicit declaration of function `bzero' packet.c: In function `packet_set_interactive': packet.c:1240: warning: implicit declaration of function `set...
2011 Mar 27
4
ipconfig problem if multiple devices are up
Hi, it seems that ipconfig has a problem if multiple devices are up and connected to the same network. It seems that it uses the wrong socket/device index to compare it to incoming packet. To be more precise, the packet gets discarded in do_pkt_recv as the ifindex from state differs always from the incoming packet To reproduce create two tap devices: $ sudo tunctl -u uli -t tap0
1998 Oct 07
1
Re: sshd and PAM [summary]
-----BEGIN PGP SIGNED MESSAGE----- Hi, I''ve got several replies, thank you for them. Let me summarize: o Many people say there is a PAMified version of ssh available at ftp://ftp.replay.com/pub/crypto/redhat/SRPMS (the source) ftp://ftp.replay.com/pub/crypto/redhat/i386 (Intel binaries) (there are analogous paths for the other architectures). The packages are made by Jan
2010 Aug 25
0
[patch] ipconfig fixes + run-init nit
...-396,6 +396,7 @@ static int loop(void) now.tv_sec - start >= loop_timeout) { printf("IP-Config: no response after %d " "secs - giving up\n", loop_timeout); + rc = -1; goto bail; } @@ -410,7 +411,7 @@ static int loop(void) bail: packet_close(); - return 0; + return rc; } static int add_one_dev(struct netdev *dev) @@ -724,7 +725,7 @@ int ipconfig_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) { @@ -8...
2001 May 14
2
openssh-2.9p1
Hi, 1. I think you should apply the attached patch to openssh-2.9p1, otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous timeout delays. 2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys?? regards Peter Breitenlohner <peb at mppmu.mpg.de> -------------- next part -------------- diff -ur openssh-2.9p1.orig/ssh-keyscan.c
2015 Jul 29
2
[PATCH] ssh: Add option to present certificates on command line
...hostname != SSH_CANONICALISE_NO) @@ -1353,6 +1361,13 @@ main(int ac, char **av) } } + for (i = 0; i < options.num_certificate_files; i++) { + free(options.certificate_files[i]); + options.certificate_files[i] = NULL; + } + + + exit_status = compat20 ? ssh_session2() : ssh_session(); packet_close(); @@ -1938,6 +1953,72 @@ ssh_session2(void) options.escape_char : SSH_ESCAPECHAR_NONE, id); } +/* Load certificate file(s) specified in options. */ +static void +load_certificate_files(void) +{ + char *filename, *cp, thishost[NI_MAXHOST]; + char *pwdir = NULL, *pwname = NULL; + struct...
2003 Oct 28
2
Privilege separation
...f we use privilege separation, the unprivileged child transfers * the current keystate and exits @@ -1501,6 +1510,7 @@ if (!compat20) destroy_sensitive_data(); } +#endif /* DISABLE_PRIVSEP */ /* Perform session preparation. */ do_authenticated(authctxt); @@ -1515,8 +1525,10 @@ packet_close(); +#ifndef DISABLE_PRIVSEP if (use_privsep) mm_terminate(); +#endif /* DISABLE_PRIVSEP */ exit(0); } @@ -1722,8 +1734,10 @@ /* Destroy the private and public keys. No longer. */ destroy_sensitive_data(); +#ifndef DISABLE_PRIVSEP if (use_privsep) mm_ssh1_session_id(session_id...
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...ey = hostjump; + + if (!(j = setjmp(kexjmp))) { + nonfatal_fatal = 1; + dispatch_run(DISPATCH_BLOCK, &c->c_kex->done, c->c_kex); + fprintf(stderr, "Impossible! dispatch_run() returned!\n"); + exit(1); + } + nonfatal_fatal = 0; + xfree(c->c_kex); + c->c_kex = NULL; + packet_close(); + if (j < 0) + j = 0; - fprintf(stdout, "%s ", output_name ? output_name : host); - key_write(rsa, stdout); + return (Key*)(j); +} + +static void +keyprint(con *c, Key *key) +{ + if (!key) + return; + + fprintf(stdout, "%s ", c->c_output_name ? c->c_output_name :...
2011 Feb 17
24
[Bug 1213] ssh-keyscan exits in mid-way
https://bugzilla.mindrot.org/show_bug.cgi?id=1213 Andreas Kotes <count-mindrot at flatline.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |count-mindrot at flatline.de Severity|normal |major --- Comment #6 from
2011 Jul 08
4
[PATCH 0/4] usr/kinit checkpatch
Various coding style fixes checkpatch warns about. The goal is not to be 100% checkpatch compliant, but to have more consistent coding style. As this is a trivial patch serie, will land in 24 hours in klibc git, unless of course ml review hits a bugger. Checked with size(3) that the generated kinit, fstype, ipconfig and nfsmount are the same. maximilian attems (4): [klibc] ipconfig: reduce