/[gentoo-x86]/net-misc/networkmanager/files/networkmanager-updatedbackend.patch
Gentoo

Contents of /net-misc/networkmanager/files/networkmanager-updatedbackend.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Nov 10 18:51:39 2010 UTC (4 years ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
punt old wrt #340329

(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)

1 Index: NetworkManager/trunk/src/backends/NetworkManagerGentoo.c
2 ===================================================================
3 --- NetworkManagerGentoo.c (revision 15)
4 +++ NetworkManagerGentoo.c (revision 38)
5 @@ -1,2 +1,3 @@
6 +
7 /* NetworkManager -- Network link manager
8 *
9 @@ -250,8 +251,20 @@
10 */
11 void nm_system_restart_mdns_responder (void)
12 -{
13 - nm_spawn_process("/etc/init.d/mDNSResponder stop");
14 - nm_spawn_process("/etc/init.d/mDNSResponder zap");
15 - nm_spawn_process("/etc/init.d/mDNSResponder start");
16 +{
17 + /* Check if the daemon was already running - do not start a new instance */
18 + /* Howl */
19 + if (g_file_test("/var/run/mDNSResponder.pid", G_FILE_TEST_EXISTS))
20 + {
21 + nm_info("Restarting mDNSResponder");
22 + nm_spawn_process("/etc/init.d/mDNSResponder stop");
23 + nm_spawn_process("/etc/init.d/mDNSResponder zap");
24 + nm_spawn_process("/etc/init.d/mDNSResponder start");
25 + }
26 + /* Apple's mDNSResponder */
27 + if (g_file_test("/var/run/mDNSResponderPosix.pid", G_FILE_TEST_EXISTS))
28 + {
29 + nm_info("Restarting mDNSResponderPosix");
30 + nm_spawn_process("/etc/init.d/mDNSResponderPosix restart");
31 + }
32 }
33
34 @@ -266,5 +279,4 @@
35 {
36 char *buf;
37 - char *addr;
38 struct ether_addr hw_addr;
39 unsigned char eui[8];
40 @@ -288,4 +300,258 @@
41 g_free(buf);
42 }
43 +/* Get the array associated with the key, and leave the current pointer
44 + * pointing at the line containing the key. The char** returned MUST
45 + * be freed by the caller.
46 + */
47 +gchar **
48 +svGetArray(shvarFile *s, const char *key)
49 +{
50 + gchar **values = NULL, **lines, *line, *value;
51 + GList *restore;
52 + int len, strvlen, i, j;
53 +
54 + g_assert(s);
55 + g_assert(key);
56 +
57 + /* Attempt to do things the easy way first */
58 + line = svGetValue(s, key);
59 + if (!line)
60 + return NULL;
61 +
62 + restore = s->current;
63 +
64 + g_strstrip(strtok(line, "#")); /* Remove comments and whitespace */
65 +
66 + if (line[0] != '(')
67 + {
68 + /* This isn't an array, so pretend it's a one item array. */
69 + values = g_renew(char*, values, 2);
70 + values[0] = line;
71 + values[1] = NULL;
72 + return values;
73 + }
74 +
75 + while(!strrchr(line, ')'))
76 + {
77 + s->current = s->current->next;
78 + value = g_strjoin(" ", line, g_strstrip(strtok(s->current->data, "#")), NULL);
79 + g_free(line);
80 + line = value;
81 + value = NULL;
82 + }
83 +
84 + lines = g_strsplit(line, "\"", 0);
85 +
86 + strvlen = g_strv_length(lines);
87 + if (strvlen == 0)
88 + {
89 + /* didn't split, something's wrong */
90 + g_free(line);
91 + return NULL;
92 + }
93 +
94 + j = 0;
95 + for (i = 0; i <= strvlen - 1; i++)
96 + {
97 + value = lines[i];
98 + len = strlen(g_strstrip(value));
99 + if ((value[0] == '(') || (value[0] == ')') || (len == 0))
100 + continue;
101 +
102 + values = g_renew(char*, values, j + 2);
103 + values[j+1] = NULL;
104 + values[j++] = g_strdup(value);
105 + }
106 +
107 + g_free(line);
108 + g_strfreev(lines);
109 + s->current = restore;
110 +
111 + return values;
112 +}
113 +
114 +/*
115 +* GentooReadConfig
116 +*
117 +* Most of this comes from the arch backend, no need to re-invent.
118 +* Read platform dependant config file and fill hash with relevant info
119 +*/
120 +static GHashTable * GentooReadConfig(const char* dev)
121 +{
122 + GHashTable *ifs;
123 + shvarFile *file;
124 + int len, hits, i = 0;
125 + guint32 maskval;
126 + gchar buf[16], *value, *cidrprefix, *gateway;
127 + gchar *config_str, *iface_str, *route_str, *mtu_str, *dnsserver_str, *dnssearch_str; /* Lookup keys */
128 + gchar **conf, **config = NULL, **routes = NULL;
129 + struct in_addr mask;
130 +
131 + file = svNewFile(SYSCONFDIR"/conf.d/net");
132 + if (!file)
133 + return NULL;
134 +
135 + ifs = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
136 + if (ifs == NULL)
137 + {
138 + nm_debug("Unable to create g_hash_table.");
139 + svCloseFile(file);
140 + return NULL;
141 + }
142 +
143 + /* Keys we will use for lookups later */
144 + config_str = g_strdup_printf("config_%s", dev);
145 + iface_str = g_strdup_printf("iface_%s", dev);
146 + route_str = g_strdup_printf("routes_%s", dev);
147 + mtu_str = g_strdup_printf("mtu_%s", dev);
148 + dnsserver_str = g_strdup_printf("dns_servers_%s", dev);
149 + dnssearch_str = g_strdup_printf("dns_search_%s", dev);
150 +
151 +
152 + if ((config = svGetArray(file, iface_str)))
153 + {
154 + /* This isn't tested, (or supported, really) so hopefully it works */
155 + nm_info("You are using a deprecated configuration syntax for %s.", dev);
156 + nm_info("You are advised to read /etc/conf.d/net.example and upgrade it accordingly.");
157 + value = svGetValue(file, "gateway");
158 + if ((value) && (gateway = strstr(value, dev)) && strtok(gateway, "/"))
159 + {
160 + /* Is it possible to specify multiple gateways using this variable? */
161 + gateway = strtok(NULL, "/");
162 + routes = g_renew(char*, routes, 2);
163 + routes[0] = g_strdup_printf("default via %s", gateway);
164 + routes[1] = NULL;
165 + g_free(value);
166 + }
167 + }
168 + else
169 + {
170 + config = svGetArray(file, config_str);
171 + routes = svGetArray(file, route_str);
172 + }
173 +
174 +
175 + if ((config) && g_ascii_strcasecmp(config[0], "dhcp"))
176 + {
177 + nm_debug("Found %s in %s.", config_str, SYSCONFDIR"/conf.d/net");
178 +
179 + if (!g_ascii_strcasecmp(config[0], "null"))
180 + {
181 + nm_debug("Config disables device %s.", dev);
182 + g_hash_table_insert(ifs, g_strdup("disabled"), g_strdup("true"));
183 + }
184 + else
185 + {
186 + /* TODO: Handle "noop". */
187 + conf = g_strsplit(config[0], " ", 0);
188 + hits = g_strv_length(conf);
189 +
190 + strtok(conf[0], "/");
191 + if ((cidrprefix = strtok(NULL, "/")))
192 + {
193 + maskval = 0xffffffff;
194 + maskval <<= (32 - atoi(cidrprefix));
195 + mask.s_addr = htonl(maskval);
196 + g_hash_table_insert(ifs, g_strdup("netmask"), g_strdup(inet_ntoa(mask)));
197 + }
198 +
199 +
200 + if ((hits > 0) && inet_aton(conf[0], &mask))
201 + {
202 + g_hash_table_insert(ifs, g_strdup(dev), g_strdup(conf[i++]));
203 + while ((hits -= 2) > 0)
204 + {
205 + g_hash_table_insert(ifs, g_strdup(conf[i]), g_strdup(conf[i+1]));
206 + i += 2;
207 + }
208 + }
209 + else
210 + {
211 + nm_debug("Unhandled configuration. Switching to DHCP.");
212 + nm_debug("\t%s = %s", config_str, config[0]);
213 + g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true"));
214 + }
215 + g_strfreev(conf);
216 + }
217 + }
218 + else
219 + {
220 + nm_debug("Enabling DHCP for device %s.", dev);
221 + g_hash_table_insert(ifs, g_strdup("dhcp"), g_strdup("true"));
222 + }
223 +
224 + g_strfreev(config);
225 +
226 + if (routes)
227 + {
228 + nm_debug("Found %s in config.", route_str);
229 +
230 + len = g_strv_length(routes);
231 + for (i = 0; i < len; i++)
232 + {
233 + if (!sscanf(routes[i], "default via %[0-9.:]", buf))
234 + continue;
235 +
236 + g_hash_table_insert(ifs,g_strdup("gateway"),g_strdup( (char*) buf));
237 + }
238 + }
239 +
240 + g_strfreev(routes);
241 +
242 + if ((value = svGetValue(file, mtu_str)))
243 + {
244 + nm_debug("Found %s in config.", mtu_str);
245 + g_hash_table_insert(ifs, g_strdup("mtu"), g_strdup(value));
246 + }
247 +
248 + g_free(value);
249 +
250 + if (!(value = svGetValue(file, dnsserver_str)))
251 + {
252 + value = svGetValue(file, "dns_servers");
253 + }
254 + if (value)
255 + {
256 + nm_debug("Found DNS nameservers in config.");
257 + g_hash_table_insert(ifs, g_strdup("nameservers"), g_strdup(value));
258 + }
259 +
260 + g_free(value);
261 +
262 + if (!(value = svGetValue(file, dnssearch_str)))
263 + {
264 + value = svGetValue(file, "dns_search");
265 + }
266 + if (value)
267 + {
268 + nm_debug("Found DNS search in config.");
269 + g_hash_table_insert(ifs, g_strdup("dnssearch"), g_strdup(value));
270 + }
271 +
272 + g_free(value);
273 + svCloseFile(file);
274 +
275 + if ((file = svNewFile(SYSCONFDIR"/conf.d/hostname")))
276 + {
277 + if ((value = svGetValue(file, "HOSTNAME")) && (strlen(value) > 0))
278 + {
279 + nm_debug("Found hostname.");
280 + g_hash_table_insert(ifs, g_strdup("hostname"), g_strdup(value));
281 + }
282 +
283 + g_free(value);
284 + svCloseFile(file);
285 + }
286 +
287 +
288 + g_free(config_str);
289 + g_free(iface_str);
290 + g_free(route_str);
291 + g_free(mtu_str);
292 + g_free(dnsserver_str);
293 + g_free(dnssearch_str);
294 +
295 + return ifs;
296 +}
297
298 typedef struct GentooSystemConfigData
299 @@ -293,6 +559,7 @@
300 NMIP4Config * config;
301 gboolean use_dhcp;
302 + gboolean system_disabled;
303 + guint32 mtu;
304 } GentooSystemConfigData;
305 -
306
307 /*
308 @@ -304,133 +571,172 @@
309 *
310 */
311 -void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
312 -{
313 - char *cfg_file_path = NULL;
314 - FILE *file = NULL;
315 - char buffer[100];
316 - char confline[100], dhcpline[100], ipline[100];
317 - int ipa, ipb, ipc, ipd;
318 - int nNext = 0, bNext = 0, count = 0;
319 - char *confToken;
320 - gboolean data_good = FALSE;
321 - gboolean use_dhcp = TRUE;
322 - GentooSystemConfigData *sys_data = NULL;
323 - guint32 ip4_address = 0;
324 - guint32 ip4_netmask = 0;
325 - guint32 ip4_gateway = 0;
326 - guint32 ip4_broadcast = 0;
327 -
328 - g_return_val_if_fail (dev != NULL, NULL);
329 -
330 - sys_data = g_malloc0 (sizeof (GentooSystemConfigData));
331 - sys_data->config = nm_device_get_ip4_config(dev);
332 - /* We use DHCP on an interface unless told not to */
333 +void* nm_system_device_get_system_config (NMDevice * dev, NMData *app_data)
334 +{
335 + GHashTable* ifh;
336 + gpointer val;
337 + gchar **strarr;
338 + GentooSystemConfigData* sys_data = NULL;
339 + int len, i;
340 +
341 + g_return_val_if_fail(dev != NULL, NULL);
342 +
343 + sys_data = g_malloc0(sizeof (GentooSystemConfigData));
344 sys_data->use_dhcp = TRUE;
345 - nm_device_set_use_dhcp (dev, TRUE);
346 -// nm_ip4_config_set_address (sys_data->config, 0);
347 -// nm_ip4_config_set_gateway (sys_data->config, 0);
348 -// nm_ip4_config_set_netmask (sys_data->config, 0);
349 -
350 - /* Gentoo systems store this information in
351 - * /etc/conf.d/net, this is for all interfaces.
352 - */
353 -
354 - cfg_file_path = g_strdup_printf ("/etc/conf.d/net");
355 - if (!cfg_file_path)
356 + sys_data->system_disabled = FALSE;
357 + sys_data->mtu = 0;
358 + sys_data->config=NULL;
359 +
360 + ifh = GentooReadConfig(nm_device_get_iface(dev));
361 + if (ifh == NULL)
362 + {
363 + g_free(sys_data);
364 return NULL;
365 -
366 - if (!(file = fopen (cfg_file_path, "r")))
367 - {
368 - g_free (cfg_file_path);
369 - return NULL;
370 - }
371 - sprintf(confline, "iface_%s", nm_device_get_iface (dev));
372 - sprintf(dhcpline, "iface_%s=\"dhcp\"", nm_device_get_iface (dev));
373 - while (fgets (buffer, 499, file) && !feof (file))
374 - {
375 - /* Kock off newline if any */
376 - g_strstrip (buffer);
377 -
378 - if (strncmp (buffer, confline, strlen(confline)) == 0)
379 + }
380 +
381 + val = g_hash_table_lookup(ifh, "disabled");
382 + if (val)
383 + {
384 + if (!strcasecmp (val, "true"))
385 + {
386 + nm_info ("System configuration disables device %s", nm_device_get_iface (dev));
387 + sys_data->system_disabled = TRUE;
388 + }
389 + }
390 +
391 + val = g_hash_table_lookup(ifh, "mtu");
392 + if (val)
393 + {
394 + guint32 mtu;
395 +
396 + mtu = strtoul(val, NULL, 10);
397 + if (mtu > 500 && mtu < INT_MAX)
398 + {
399 + nm_debug("System configuration specifies a MTU of %i for device %s", mtu, nm_device_get_iface(dev));
400 + sys_data->mtu = mtu;
401 + }
402 + }
403 + val = g_hash_table_lookup(ifh, "hostname");
404 + if (val)
405 + {
406 + nm_ip4_config_set_hostname(sys_data->config, val);
407 + }
408 +
409 + val = g_hash_table_lookup(ifh, nm_device_get_iface(dev));
410 + if (val && !g_hash_table_lookup(ifh, "dhcp"))
411 + {
412 + /* This device does not use DHCP */
413 +
414 + sys_data->use_dhcp=FALSE;
415 + sys_data->config = nm_ip4_config_new();
416 +
417 + nm_ip4_config_set_address (sys_data->config, inet_addr (val));
418 +
419 + val = g_hash_table_lookup(ifh, "gateway");
420 + if (val)
421 + nm_ip4_config_set_gateway (sys_data->config, inet_addr (val));
422 + else
423 + {
424 + nm_info ("Network configuration for device '%s' does not specify a gateway but is "
425 + "statically configured (non-DHCP).", nm_device_get_iface (dev));
426 + }
427 +
428 + val = g_hash_table_lookup(ifh, "netmask");
429 + if (val)
430 + nm_ip4_config_set_netmask (sys_data->config, inet_addr (val));
431 + else
432 + {
433 + guint32 addr = nm_ip4_config_get_address (sys_data->config);
434 +
435 + /* Make a default netmask if we have an IP address */
436 + if (((ntohl (addr) & 0xFF000000) >> 24) <= 127)
437 + nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000));
438 + else if (((ntohl (addr) & 0xFF000000) >> 24) <= 191)
439 + nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000));
440 + else
441 + nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00));
442 + }
443 +
444 + val = g_hash_table_lookup(ifh, "broadcast");
445 + if (val)
446 + nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val));
447 + else if ((val = g_hash_table_lookup(ifh, "brd")))
448 + nm_ip4_config_set_broadcast (sys_data->config, inet_addr (val));
449 + else
450 + {
451 + guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config))
452 + | ~nm_ip4_config_get_netmask (sys_data->config));
453 + nm_ip4_config_set_broadcast (sys_data->config, broadcast);
454 + }
455 +
456 + val = g_hash_table_lookup(ifh, "nameservers");
457 + if (val)
458 + {
459 + nm_debug("Using DNS nameservers \"%s\" from config for device %s.", val, nm_device_get_iface(dev));
460 + if ((strarr = g_strsplit(val, " ", 0)))
461 {
462 - /* Make sure this config file is for this device */
463 - if (strncmp (&buffer[strlen(confline) - strlen(nm_device_get_iface (dev))],
464 - nm_device_get_iface (dev), strlen(nm_device_get_iface (dev))) != 0)
465 + len = g_strv_length(strarr);
466 + for(i = 0; i < len; i++)
467 {
468 - nm_warning ("System config file '%s' does not define device '%s'\n",
469 - cfg_file_path, nm_device_get_iface (dev));
470 - break;
471 - }
472 - else
473 - data_good = TRUE;
474 -
475 - if (strncmp (buffer, dhcpline, strlen(dhcpline)) == 0)
476 - {
477 - use_dhcp = TRUE;
478 + guint32 addr = (guint32) (inet_addr (strarr[i]));
479 +
480 + if (addr != (guint32) -1)
481 + nm_ip4_config_add_nameserver(sys_data->config, addr);
482 + }
483 +
484 + g_strfreev(strarr);
485 }
486 else
487 {
488 - use_dhcp = FALSE;
489 - confToken = strtok(&buffer[strlen(confline) + 2], " ");
490 - while (count < 3)
491 - {
492 - if (nNext == 1 && bNext == 1)
493 - {
494 - ip4_address = inet_addr (confToken);
495 - count++;
496 - continue;
497 - }
498 - if (strcmp(confToken, "netmask") == 0)
499 - {
500 - confToken = strtok(NULL, " ");
501 - ip4_netmask = inet_addr (confToken);
502 - count++;
503 - nNext = 1;
504 - }
505 - else if (strcmp(confToken, "broadcast") == 0)
506 - {
507 - confToken = strtok(NULL, " ");
508 - count++;
509 - bNext = 1;
510 - }
511 - else
512 - {
513 - ip4_address = inet_addr (confToken);
514 - count++;
515 - }
516 - confToken = strtok(NULL, " ");
517 - }
518 + guint32 addr = (guint32) (inet_addr (val));
519 +
520 + if (addr != (guint32) -1)
521 + nm_ip4_config_add_nameserver(sys_data->config, addr);
522 + }
523 + }
524 +
525 + val = g_hash_table_lookup(ifh, "dnssearch");
526 + if (val)
527 + {
528 + nm_debug("Using DNS search \"%s\" from config for device %s.", val, nm_device_get_iface(dev));
529 + if ((strarr = g_strsplit(val, " ", 0)))
530 + {
531 + len = g_strv_length(strarr);
532 + for(i = 0; i < len; i++)
533 + {
534 + if (strarr[i])
535 + nm_ip4_config_add_domain(sys_data->config, strarr[i]);
536 }
537 +
538 + g_strfreev(strarr);
539 }
540 - /* If we aren't using dhcp, then try to get the gateway */
541 - if (!use_dhcp)
542 + else
543 {
544 - sprintf(ipline, "gateway=\"%s/", nm_device_get_iface (dev));
545 - if (strncmp(buffer, ipline, strlen(ipline) - 1) == 0)
546 + nm_ip4_config_add_domain(sys_data->config, val);
547 + }
548 + }
549 +
550 + nm_ip4_config_set_mtu (sys_data->config, sys_data->mtu);
551 +
552 +#if 0
553 + {
554 + int j;
555 + nm_debug ("------ Config (%s)", nm_device_get_iface (dev));
556 + nm_debug (" ADDR=%d", nm_ip4_config_get_address (sys_data->config));
557 + nm_debug (" GW =%d", nm_ip4_config_get_gateway (sys_data->config));
558 + nm_debug (" NM =%d", nm_ip4_config_get_netmask (sys_data->config));
559 + nm_debug (" NSs =%d",nm_ip4_config_get_num_nameservers(sys_data->config));
560 + for (j=0;j<nm_ip4_config_get_num_nameservers(sys_data->config);j++)
561 {
562 - sprintf(ipline, "gateway=\"%s/%%d.%%d.%%d.%%d\"", nm_device_get_iface (dev) );
563 - sscanf(buffer, ipline, &ipa, &ipb, &ipc, &ipd);
564 - sprintf(ipline, "%d.%d.%d.%d", ipa, ipb, ipc, ipd);
565 - ip4_gateway = inet_addr (ipline);
566 + nm_debug (" NS =%d",nm_ip4_config_get_nameserver(sys_data->config,j));
567 }
568 - }
569 - }
570 - fclose (file);
571 - g_free (cfg_file_path);
572 -
573 - /* If successful, set values on the device */
574 - if (data_good)
575 - {
576 - nm_warning("data good :-)");
577 - nm_device_set_use_dhcp (dev, use_dhcp);
578 - if (ip4_address)
579 - nm_ip4_config_set_address (sys_data->config, ip4_address);
580 - if (ip4_gateway)
581 - nm_ip4_config_set_gateway (sys_data->config, ip4_gateway);
582 - if (ip4_netmask)
583 - nm_ip4_config_set_netmask (sys_data->config, ip4_netmask);
584 - if (ip4_broadcast)
585 - nm_ip4_config_set_broadcast (sys_data->config, ip4_broadcast);
586 - }
587 + nm_debug ("---------------------\n");
588 + }
589 +#endif
590 +
591 + }
592 +
593 + g_hash_table_destroy(ifh);
594 +
595 +
596 return (void *)sys_data;
597 }
598 @@ -519,4 +825,11 @@
599 gboolean nm_system_device_get_disabled (NMDevice *dev)
600 {
601 + GentooSystemConfigData *sys_data;
602 +
603 + g_return_val_if_fail (dev != NULL, FALSE);
604 +
605 + if ((sys_data = nm_device_get_system_config_data (dev)))
606 + return sys_data->system_disabled;
607 +
608 return FALSE;
609 }
610 @@ -576,4 +889,35 @@
611 void nm_system_set_hostname (NMIP4Config *config)
612 {
613 + char *h_name = NULL;
614 + const char *hostname;
615 +
616 + g_return_if_fail (config != NULL);
617 +
618 + hostname = nm_ip4_config_get_hostname (config);
619 + if (!hostname)
620 + {
621 + struct in_addr temp_addr;
622 + struct hostent *host;
623 +
624 + /* try to get hostname via dns */
625 + temp_addr.s_addr = nm_ip4_config_get_address (config);
626 + host = gethostbyaddr ((char *) &temp_addr, sizeof (temp_addr), AF_INET);
627 + if (host)
628 + {
629 + h_name = g_strdup (host->h_name);
630 + hostname = strtok (h_name, ".");
631 + }
632 + else
633 + nm_warning ("nm_system_set_hostname(): gethostbyaddr failed, h_errno = %d", h_errno);
634 + }
635 +
636 + if (hostname)
637 + {
638 + nm_info ("Setting hostname to '%s'", hostname);
639 + if (sethostname (hostname, strlen (hostname)) < 0)
640 + nm_warning ("Could not set hostname.");
641 + }
642 +
643 + g_free (h_name);
644 }
645
646 @@ -596,4 +940,11 @@
647 guint32 nm_system_get_mtu (NMDevice *dev)
648 {
649 + GentooSystemConfigData *sys_data;
650 +
651 + g_return_val_if_fail (dev != NULL, 0);
652 +
653 + if ((sys_data = nm_device_get_system_config_data (dev)))
654 + return sys_data->mtu;
655 +
656 return 0;
657 }

  ViewVC Help
Powered by ViewVC 1.1.20