Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mpl/dhcp/dist/relay Add missing call to libdhcp_cal...



details:   https://anonhg.NetBSD.org/src/rev/570211e633b0
branches:  trunk
changeset: 379233:570211e633b0
user:      christos <christos%NetBSD.org@localhost>
date:      Fri May 21 21:07:37 2021 +0000

description:
Add missing call to libdhcp_callbacks_register().  Should stop
dhcrelay() crashing when accessing *libdhcp_callbacks.local_port.
(from mrg@)

diffstat:

 external/mpl/dhcp/dist/relay/dhcrelay.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 0cd5e20a66a9 -r 570211e633b0 external/mpl/dhcp/dist/relay/dhcrelay.c
--- a/external/mpl/dhcp/dist/relay/dhcrelay.c   Fri May 21 20:42:05 2021 +0000
+++ b/external/mpl/dhcp/dist/relay/dhcrelay.c   Fri May 21 21:07:37 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dhcrelay.c,v 1.3 2020/08/03 21:10:57 christos Exp $    */
+/*     $NetBSD: dhcrelay.c,v 1.4 2021/05/21 21:07:37 christos Exp $    */
 
 /* dhcrelay.c
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: dhcrelay.c,v 1.3 2020/08/03 21:10:57 christos Exp $");
+__RCSID("$NetBSD: dhcrelay.c,v 1.4 2021/05/21 21:07:37 christos Exp $");
 
 #include "dhcpd.h"
 #include <syslog.h>
@@ -264,7 +264,7 @@ char *progname;
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: dhcrelay.c,v 1.3 2020/08/03 21:10:57 christos Exp $");
+__RCSID("$NetBSD: dhcrelay.c,v 1.4 2021/05/21 21:07:37 christos Exp $");
 static const char use_noarg[] = "No argument for command: %s";
 #ifdef RELAY_PORT
 static const char use_port_defined[] = "Port already set, %s inappropriate";
@@ -317,6 +317,8 @@ main(int argc, char **argv) {
        int local_family_set = 0;
 #endif
 
+       libdhcp_callbacks_register(&dhcrelay_callbacks);
+
 #ifdef OLD_LOG_NAME
        progname = "dhcrelay";
 #else



Home | Main Index | Thread Index | Old Index