Browse Source

On Linux, feed the output of 'ip addr show' into /dev/random after the

network is up to improve entropy. Idea picked up from Theodore Y. Ts'o,
http://lkml.org/lkml/2007/12/8/108.

r60087
tags/1.52
Colin Watson 12 years ago
parent
commit
3419850a5c
5 changed files with 16 additions and 0 deletions
  1. +5
    -0
      debian/changelog
  2. +7
    -0
      netcfg-common.c
  3. +1
    -0
      netcfg-static.c
  4. +1
    -0
      netcfg.c
  5. +2
    -0
      netcfg.h

+ 5
- 0
debian/changelog View File

@@ -9,6 +9,11 @@ netcfg (1.52) UNRELEASED; urgency=low
netcfg/enable template. Thanks to Anthony L. Awtrey
<tony@awtrey.com> for the patch. Closes: #538265

[ Colin Watson ]
* On Linux, feed the output of 'ip addr show' into /dev/random after the
network is up to improve entropy. Idea picked up from Theodore Y. Ts'o,
http://lkml.org/lkml/2007/12/8/108.

-- Luca Favatella <slackydeb@gmail.com> Thu, 23 Jul 2009 00:44:44 +0200

netcfg (1.51) unstable; urgency=low


+ 7
- 0
netcfg-common.c View File

@@ -921,3 +921,10 @@ int netcfg_get_nameservers (struct debconfclient *client, char **nameservers)
*nameservers = strdup(ptr);
return ret;
}

void netcfg_update_entropy (void)
{
#ifdef __linux__
di_exec_shell("ip addr show >/dev/random");
#endif
}

+ 1
- 0
netcfg-static.c View File

@@ -102,6 +102,7 @@ int main(int argc, char** argv)
break;
case QUIT:
netcfg_update_entropy();
return 0;
}
}


+ 1
- 0
netcfg.c View File

@@ -276,6 +276,7 @@ int main(int argc, char *argv[])
break;
case QUIT:
netcfg_update_entropy();
return 0;
}
}


+ 2
- 0
netcfg.h View File

@@ -130,6 +130,8 @@ extern void parse_args (int argc, char** argv);
extern void open_sockets (void);
extern void reap_old_files (void);

extern void netcfg_update_entropy (void);

extern int netcfg_write_resolv (char*, struct in_addr *);

extern int ethtool_lite (char*);


Loading…
Cancel
Save