net-tools/net-tools-1.60-execshield.patch
cvsdist 9b13b6b10c auto-import changelog data from net-tools-1.60-27.src.rpm
Fri May 14 2004 Phil Knirsch <pknirsch@redhat.com> 1.60-27
- Fixed compiler warning/error in netplug.
- Updated to netplug-1.2.6 for security update and fixes.
2004-09-09 09:13:13 +00:00

52 lines
1.4 KiB
Diff

diff -urN net-tools-1.60/netplug-1.2.6/main.c net-tools-1.60.new/netplug-1.2.6/main.c
--- net-tools-1.60/netplug-1.2.6/main.c 2004-02-22 06:52:14.000000000 +0100
+++ net-tools-1.60.new/netplug-1.2.6/main.c 2004-05-06 18:28:22.845977718 +0200
@@ -149,10 +149,10 @@
/* Poll the existing interface state, so we can catch any state
changes for which we may not have neen a netlink message. */
+static int sockfd = -1;
static void
poll_interfaces(void)
{
- static int sockfd = -1;
if (sockfd == -1) {
sockfd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
@@ -182,6 +182,12 @@
for_each_iface(pollflags);
}
+int poll_flags(struct if_info *i) {
+ if (if_match(i->name))
+ ifsm_flagpoll(i);
+ return 0;
+}
+
int debug = 0;
int
@@ -287,17 +293,11 @@
{ child_handler_pipe[0], POLLIN, 0 },
};
- {
- /* Run over each of the interfaces we know and care about, and
- make sure the state machine has done the appropriate thing
- for their current state. */
- int poll_flags(struct if_info *i) {
- if (if_match(i->name))
- ifsm_flagpoll(i);
- return 0;
- }
- for_each_iface(poll_flags);
- }
+ /* Run over each of the interfaces we know and care about, and
+ make sure the state machine has done the appropriate thing
+ for their current state. */
+ for_each_iface(poll_flags);
+
for(;;) {
int ret;