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