1 Index: dibbler-0.6.0-RC1/Port-linux/iproute.c
2 ===================================================================
3 --- dibbler-0.6.0-RC1.orig/Port-linux/iproute.c 2007-10-21 09:25:04.698543780 +0200
4 +++ dibbler-0.6.0-RC1/Port-linux/iproute.c 2007-10-21 09:25:30.572018227 +0200
6 #include <netinet/ip.h>
8 #include <linux/in_route.h>
9 -#include <linux/ip_mp_alg.h>
17 -static char *mp_alg_names[IP_MP_ALG_MAX+1] = {
18 - [IP_MP_ALG_NONE] = "none",
19 - [IP_MP_ALG_RR] = "rr",
20 - [IP_MP_ALG_DRR] = "drr",
21 - [IP_MP_ALG_RANDOM] = "random",
22 - [IP_MP_ALG_WRANDOM] = "wrandom"
25 static int flush_update(void)
27 if (rtnl_send(&rth, filter.flushb, filter.flushp) < 0) {
29 fprintf(fp, "tos %s ", rtnl_dsfield_n2a(r->rtm_tos, b1, sizeof(b1)));
32 - if (tb[RTA_MP_ALGO]) {
33 - __u32 mp_alg = *(__u32*) RTA_DATA(tb[RTA_MP_ALGO]);
34 - if (mp_alg > IP_MP_ALG_NONE) {
35 - fprintf(fp, "mpath %s ",
36 - mp_alg < IP_MP_ALG_MAX ? mp_alg_names[mp_alg] : "unknown");
40 if (tb[RTA_GATEWAY] && filter.rvia.bitlen != host_len) {
41 fprintf(fp, "via %s ",
42 format_host(r->rtm_family,
44 strcmp(*argv, "oif") == 0) {
47 - } else if (strcmp(*argv, "mpath") == 0 ||
48 - strcmp(*argv, "mp") == 0) {
50 - __u32 mp_alg = IP_MP_ALG_NONE;
53 - for (i = 1; i < ARRAY_SIZE(mp_alg_names); i++)
54 - if (strcmp(*argv, mp_alg_names[i]) == 0)
56 - if (mp_alg == IP_MP_ALG_NONE)
57 - invarg("\"mpath\" value is invalid\n", *argv);
58 - addattr_l(&req.n, sizeof(req), RTA_MP_ALGO, &mp_alg, sizeof(mp_alg));