integ/base/initscripts/centos/patches/dhclient-restrict-interfaces-to-those-on-c.patch
Scott Little bab9bb6b69 Internal restructuring of stx-integ
Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 10:06:31 -04:00

64 lines
3.2 KiB
Diff

From bafc4d1f7971edbe7cd411fbe2ee6876ded35c6e Mon Sep 17 00:00:00 2001
From: Allain Legacy <allain.legacy@windriver.com>
Date: Thu, 14 Apr 2016 12:04:55 -0400
Subject: [PATCH] CGTS-3416: dhclient: restrict interfaces to those on command
line only
By default, the dhclient process does not respect the list of interfaces
supplied at the command line. It configures any interfaces found to be
specified in the config file. Since we customize options for each interface in
our config file and run a separate dhclient process for each interface we end
up with multiple dhclient processes that each service all interfaces. This is
undesirable because it is possible that a request is sent by process A but
received by process B. This leads to lease expiry events even though a valid
request packet was returned by the server.
This change introduces a "--restrict-interfaces" option to the dhclient process
to force it to ignore all interfaces in config files other than those specified
at the command line.
To activate this change our version of ifup/ifdown has been modified to
pass the "--restrict-interfaces" to dhclient as well as to request that each
process use its own lease file to avoid file corruption.
---
sysconfig/network-scripts/ifdown-eth | 2 +-
sysconfig/network-scripts/ifup-eth | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 7ccbddf..5b75162 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -93,6 +93,6 @@ for VER in "" 6 ; do
generate_lease_file_name $VER
if is_true "$DHCPRELEASE"; then
- /sbin/dhclient -r -lf ${LEASEFILE} -pf /var/run/dhclient$VER-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
+ /sbin/dhclient -r -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient$VER-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
retcode=$?
else
kill $dhcpid >/dev/null 2>&1
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 3da5c16..9bcf57f 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -187,7 +187,7 @@ if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then
generate_lease_file_name
# Initialize the dhclient args and obtain the hostname options if needed:
- DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient-${DEVICE}.pid"
+ DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient-${DEVICE}.pid"
set_hostname_options DHCLIENTARGS
echo
@@ -333,6 +333,6 @@ if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then
# Initialize the dhclient args for IPv6 and obtain the hostname options if needed:
- DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}"
+ DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}"
set_hostname_options DHCLIENTARGS
if /sbin/dhclient $DHCLIENTARGS; then
--
1.9.1