Source-Changes-HG archive

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

[src/netbsd-7]: src Pull up the following, requested by pettai in ticket #495:



details:   https://anonhg.NetBSD.org/src/rev/6f8d9eb796e2
branches:  netbsd-7
changeset: 798959:6f8d9eb796e2
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 05 15:13:12 2015 +0000

description:
Pull up the following, requested by pettai in ticket #495:

        external/bsd/dhcpcd/dist/arp.c                  up to 1.9
        external/bsd/dhcpcd/dist/arp.h                  up to 1.8
        external/bsd/dhcpcd/dist/auth.c                 up to 1.8
        external/bsd/dhcpcd/dist/auth.h                 up to 1.8
        external/bsd/dhcpcd/dist/common.c               up to 1.8
        external/bsd/dhcpcd/dist/common.h               up to 1.7
        external/bsd/dhcpcd/dist/control.c              up to 1.7
        external/bsd/dhcpcd/dist/control.h              up to 1.7
        external/bsd/dhcpcd/dist/defs.h                 up to 1.14
        external/bsd/dhcpcd/dist/dev.h                  up to 1.7
        external/bsd/dhcpcd/dist/dhcp-common.c          up to 1.7
        external/bsd/dhcpcd/dist/dhcp-common.h          up to 1.7
        external/bsd/dhcpcd/dist/dhcp.c                 up to 1.27
        external/bsd/dhcpcd/dist/dhcp.h                 up to 1.7
        external/bsd/dhcpcd/dist/dhcp6.c                up to 1.9
        external/bsd/dhcpcd/dist/dhcp6.h                up to 1.7
        external/bsd/dhcpcd/dist/dhcpcd-definitions.conf up to 1.7
        external/bsd/dhcpcd/dist/dhcpcd-embedded.c      up to 1.7
        external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in   up to 1.1.1.2
        external/bsd/dhcpcd/dist/dhcpcd-embedded.h      up to 1.7
        external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in   up to 1.1.1.3
        external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in  up to 1.13
        external/bsd/dhcpcd/dist/dhcpcd.8.in            up to 1.40
        external/bsd/dhcpcd/dist/dhcpcd.c               up to 1.22
        external/bsd/dhcpcd/dist/dhcpcd.conf.5.in       up to 1.18
        external/bsd/dhcpcd/dist/dhcpcd.h               up to 1.9
        external/bsd/dhcpcd/dist/duid.c                 up to 1.7
        external/bsd/dhcpcd/dist/duid.h                 up to 1.7
        external/bsd/dhcpcd/dist/eloop.c                up to 1.8
        external/bsd/dhcpcd/dist/eloop.h                up to 1.7
        external/bsd/dhcpcd/dist/if-bsd.c               up to 1.17
        external/bsd/dhcpcd/dist/if-options.c           up to 1.20
        external/bsd/dhcpcd/dist/if-options.h           up to 1.8
        external/bsd/dhcpcd/dist/if.c                   up to 1.11
        external/bsd/dhcpcd/dist/if.h                   up to 1.8
        external/bsd/dhcpcd/dist/ipv4.c                 up to 1.11
        external/bsd/dhcpcd/dist/ipv4.h                 up to 1.8
        external/bsd/dhcpcd/dist/ipv4ll.c               up to 1.8
        external/bsd/dhcpcd/dist/ipv6.c                 up to 1.8
        external/bsd/dhcpcd/dist/ipv6.h                 up to 1.10
        external/bsd/dhcpcd/dist/ipv6nd.c               up to 1.20
        external/bsd/dhcpcd/dist/ipv6nd.h               up to 1.9
        external/bsd/dhcpcd/dist/script.c               up to 1.17
        external/bsd/dhcpcd/dist/crypt/crypt.h          up to 1.6
        external/bsd/dhcpcd/dist/crypt/hmac_md5.c       up to 1.6
        doc/3RDPARTY                                    1.1198

Import dhcpcd version 6.7.1.

diffstat:

 doc/3RDPARTY                                     |    6 +-
 external/bsd/dhcpcd/dist/arp.c                   |    4 +-
 external/bsd/dhcpcd/dist/arp.h                   |    6 +-
 external/bsd/dhcpcd/dist/auth.c                  |    4 +-
 external/bsd/dhcpcd/dist/auth.h                  |    4 +-
 external/bsd/dhcpcd/dist/common.c                |    4 +-
 external/bsd/dhcpcd/dist/common.h                |    4 +-
 external/bsd/dhcpcd/dist/control.c               |    4 +-
 external/bsd/dhcpcd/dist/control.h               |    4 +-
 external/bsd/dhcpcd/dist/crypt/crypt.h           |    4 +-
 external/bsd/dhcpcd/dist/crypt/hmac_md5.c        |    4 +-
 external/bsd/dhcpcd/dist/defs.h                  |    6 +-
 external/bsd/dhcpcd/dist/dev.h                   |    4 +-
 external/bsd/dhcpcd/dist/dhcp-common.c           |    4 +-
 external/bsd/dhcpcd/dist/dhcp-common.h           |    4 +-
 external/bsd/dhcpcd/dist/dhcp.c                  |   54 +-
 external/bsd/dhcpcd/dist/dhcp.h                  |   16 +-
 external/bsd/dhcpcd/dist/dhcp6.c                 |   19 +-
 external/bsd/dhcpcd/dist/dhcp6.h                 |   14 +-
 external/bsd/dhcpcd/dist/dhcpcd-definitions.conf |    4 +-
 external/bsd/dhcpcd/dist/dhcpcd-embedded.c       |    4 +-
 external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in    |    2 +-
 external/bsd/dhcpcd/dist/dhcpcd-embedded.h       |    4 +-
 external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in    |    2 +-
 external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in   |    4 +-
 external/bsd/dhcpcd/dist/dhcpcd.8.in             |   18 +-
 external/bsd/dhcpcd/dist/dhcpcd.c                |   38 +-
 external/bsd/dhcpcd/dist/dhcpcd.conf.5.in        |   20 +-
 external/bsd/dhcpcd/dist/dhcpcd.h                |    7 +-
 external/bsd/dhcpcd/dist/duid.c                  |    4 +-
 external/bsd/dhcpcd/dist/duid.h                  |    4 +-
 external/bsd/dhcpcd/dist/eloop.c                 |    4 +-
 external/bsd/dhcpcd/dist/eloop.h                 |    4 +-
 external/bsd/dhcpcd/dist/if-bsd.c                |  158 +++++-
 external/bsd/dhcpcd/dist/if-options.c            |   55 +-
 external/bsd/dhcpcd/dist/if-options.h            |    7 +-
 external/bsd/dhcpcd/dist/if.c                    |   46 +-
 external/bsd/dhcpcd/dist/if.h                    |    9 +-
 external/bsd/dhcpcd/dist/ipv4.c                  |    4 +-
 external/bsd/dhcpcd/dist/ipv4.h                  |    4 +-
 external/bsd/dhcpcd/dist/ipv4ll.c                |    4 +-
 external/bsd/dhcpcd/dist/ipv6.c                  |  626 +++++++++++++++++++---
 external/bsd/dhcpcd/dist/ipv6.h                  |   74 ++-
 external/bsd/dhcpcd/dist/ipv6nd.c                |   71 ++-
 external/bsd/dhcpcd/dist/ipv6nd.h                |    8 +-
 external/bsd/dhcpcd/dist/script.c                |   10 +-
 46 files changed, 1083 insertions(+), 281 deletions(-)

diffs (truncated from 2734 to 300 lines):

diff -r c327a45a5a48 -r 6f8d9eb796e2 doc/3RDPARTY
--- a/doc/3RDPARTY      Thu Feb 05 08:43:55 2015 +0000
+++ b/doc/3RDPARTY      Thu Feb 05 15:13:12 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: 3RDPARTY,v 1.1145.2.7 2015/01/27 08:14:03 martin Exp $
+#      $NetBSD: 3RDPARTY,v 1.1145.2.8 2015/02/05 15:13:12 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -305,8 +305,8 @@
 Use the dhcp2netbsd script.
 
 Package:       dhcpcd
-Version:       6.4.3
-Current Vers:  6.4.3
+Version:       6.7.1
+Current Vers:  6.7.1
 Maintainer:    roy
 Archive Site:  ftp://roy.marples.name/pub/dhcpcd/
 Home Page:     http://roy.marples.name/projects/dhcpcd/
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/arp.c
--- a/external/bsd/dhcpcd/dist/arp.c    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/arp.c    Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: arp.c,v 1.1.1.13.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: arp.c,v 1.1.1.13.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/arp.h
--- a/external/bsd/dhcpcd/dist/arp.h    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/arp.h    Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: arp.h,v 1.1.1.4.4.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: arp.h,v 1.1.1.4.4.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -77,6 +77,6 @@
 void arp_free_but(struct arp_state *);
 void arp_close(struct interface *);
 #else
-#define arp_close(a)
+#define arp_close(a) {}
 #endif
 #endif
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/auth.c
--- a/external/bsd/dhcpcd/dist/auth.c   Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/auth.c   Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: auth.c,v 1.1.1.4.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: auth.c,v 1.1.1.4.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/auth.h
--- a/external/bsd/dhcpcd/dist/auth.h   Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/auth.h   Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: auth.h,v 1.1.1.2.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: auth.h,v 1.1.1.2.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/common.c
--- a/external/bsd/dhcpcd/dist/common.c Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/common.c Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: common.c,v 1.1.1.15.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: common.c,v 1.1.1.15.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/common.h
--- a/external/bsd/dhcpcd/dist/common.h Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/common.h Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: common.h,v 1.1.1.11.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: common.h,v 1.1.1.11.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/control.c
--- a/external/bsd/dhcpcd/dist/control.c        Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/control.c        Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: control.c,v 1.1.1.7.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: control.c,v 1.1.1.7.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/control.h
--- a/external/bsd/dhcpcd/dist/control.h        Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/control.h        Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: control.h,v 1.1.1.5.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: control.h,v 1.1.1.5.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/crypt/crypt.h
--- a/external/bsd/dhcpcd/dist/crypt/crypt.h    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/crypt/crypt.h    Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: crypt.h,v 1.1.1.2.2.1 2014/12/29 16:18:05 martin Exp $ */
+/* $NetBSD: crypt.h,v 1.1.1.2.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/crypt/hmac_md5.c
--- a/external/bsd/dhcpcd/dist/crypt/hmac_md5.c Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/crypt/hmac_md5.c Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: hmac_md5.c,v 1.1.1.4.2.1 2014/12/29 16:18:05 martin Exp $");
+ __RCSID("$NetBSD: hmac_md5.c,v 1.1.1.4.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/defs.h
--- a/external/bsd/dhcpcd/dist/defs.h   Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/defs.h   Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: defs.h,v 1.1.1.41.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: defs.h,v 1.1.1.41.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
 #define CONFIG_H
 
 #define PACKAGE                        "dhcpcd"
-#define VERSION                        "6.6.7"
+#define VERSION                        "6.7.1"
 
 #ifndef CONFIG
 # define CONFIG                        SYSCONFDIR "/" PACKAGE ".conf"
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/dev.h
--- a/external/bsd/dhcpcd/dist/dev.h    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/dev.h    Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: dev.h,v 1.1.1.4.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: dev.h,v 1.1.1.4.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/dhcp-common.c
--- a/external/bsd/dhcpcd/dist/dhcp-common.c    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp-common.c    Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp-common.c,v 1.1.1.7.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: dhcp-common.c,v 1.1.1.7.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/dhcp-common.h
--- a/external/bsd/dhcpcd/dist/dhcp-common.h    Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp-common.h    Thu Feb 05 15:13:12 2015 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: dhcp-common.h,v 1.1.1.5.2.1 2014/12/29 16:18:04 martin Exp $ */
+/* $NetBSD: dhcp-common.h,v 1.1.1.5.2.2 2015/02/05 15:13:12 martin Exp $ */
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
diff -r c327a45a5a48 -r 6f8d9eb796e2 external/bsd/dhcpcd/dist/dhcp.c
--- a/external/bsd/dhcpcd/dist/dhcp.c   Thu Feb 05 08:43:55 2015 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp.c   Thu Feb 05 15:13:12 2015 +0000
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp.c,v 1.15.2.1 2014/12/29 16:18:04 martin Exp $");
+ __RCSID("$NetBSD: dhcp.c,v 1.15.2.2 2015/02/05 15:13:12 martin Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2014 Roy Marples <roy%marples.name@localhost>
+ * Copyright (c) 2006-2015 Roy Marples <roy%marples.name@localhost>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -2489,6 +2489,16 @@
        /* reset the message counter */
        state->interval = 0;
 
+       /* Ensure that no reject options are present */
+       for (i = 1; i < 255; i++) {
+               if (has_option_mask(ifo->rejectmask, i) &&
+                   get_option_uint8(iface->ctx, &tmp, dhcp, (uint8_t)i) == 0)
+               {
+                       log_dhcp(LOG_WARNING, "reject DHCP", iface, dhcp, from);
+                       return;
+               }
+       }
+
        if (type == DHCP_NAK) {
                /* For NAK, only check if we require the ServerID */
                if (has_option_mask(ifo->requiremask, DHO_SERVERID) &&
@@ -2525,6 +2535,23 @@
                return;
        }
 
+       /* Ensure that all required options are present */
+       for (i = 1; i < 255; i++) {
+               if (has_option_mask(ifo->requiremask, i) &&
+                   get_option_uint8(iface->ctx, &tmp, dhcp, (uint8_t)i) != 0)
+               {
+                       /* If we are bootp, then ignore the need for serverid.
+                        * To ignore bootp, require dhcp_message_type.
+                        * However, nothing really stops bootp from providing
+                        * DHCP style options as well so the above isn't
+                        * always true. */
+                       if (type == 0 && i == DHO_SERVERID)
+                               continue;
+                       log_dhcp(LOG_WARNING, "reject DHCP", iface, dhcp, from);
+                       return;
+               }
+       }
+
        /* DHCP Auto-Configure, RFC 2563 */
        if (type == DHCP_OFFER && dhcp->yiaddr == 0) {
                log_dhcp(LOG_WARNING, "no address given", iface, dhcp, from);
@@ -2571,20 +2598,6 @@
                return;
        }
 
-       /* Ensure that all required options are present */



Home | Main Index | Thread Index | Old Index