summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-13 18:58:56 -0700
committerSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-13 18:58:56 -0700
commit3f155c230e73ea76747312cd2b6b6f2f8ab61c6a (patch)
tree384a3aba64ba2584dde546594ba865695e4c9826
parentd4e0c3e67ad3f412bd469b528813211a99bdb90e (diff)
downloadvyatta-cfg-vpn-3f155c230e73ea76747312cd2b6b6f2f8ab61c6a.tar.gz
vyatta-cfg-vpn-3f155c230e73ea76747312cd2b6b6f2f8ab61c6a.zip
Bugfix: 8276: Change htonl after parsing the input.
-rw-r--r--src/cfgvti.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cfgvti.c b/src/cfgvti.c
index d3c1dc1..d982630 100644
--- a/src/cfgvti.c
+++ b/src/cfgvti.c
@@ -268,12 +268,13 @@ int main (int argc, char *argv[])
uval = htonl(tmp.s_addr);
} else {
errno = 0;
- uval = htonl(strtoul(*argv, 0, 0));
+ uval = strtoul(*argv, 0, 0);
if (errno) {
fprintf(stderr,
"Invalid \"mark\" %s\n", *argv);
exit(-1);
}
+ uval = htonl(uval);
}
mark = uval;
} else if (strcmp(*argv, "remote") == 0) {