diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-21 11:53:28 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-10-21 11:53:28 +0000 |
commit | 14545e3032c5fdfe7c59ed86edaf389219c05d5f (patch) | |
tree | a72cb36d5aa8f88a3adb7f9cc5418259c5c68499 /usr.sbin/ospfd | |
parent | f1622a73222ac55c3e7cd9e7feccd2ec6c543a99 (diff) |
htons() instead of ntohs() when going from host to network.
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r-- | usr.sbin/ospfd/lsupdate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/lsupdate.c b/usr.sbin/ospfd/lsupdate.c index b5503b6b2d2..3cbba9d5e86 100644 --- a/usr.sbin/ospfd/lsupdate.c +++ b/usr.sbin/ospfd/lsupdate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lsupdate.c,v 1.19 2005/10/21 08:29:25 claudio Exp $ */ +/* $OpenBSD: lsupdate.c,v 1.20 2005/10/21 11:53:27 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -177,7 +177,7 @@ send_ls_update(struct iface *iface, struct in_addr addr, void *data, int len) age = ntohs(age); if ((age += iface->transmit_delay) >= MAX_AGE) age = MAX_AGE; - age = ntohs(age); + age = htons(age); memcpy(buf_seek(buf, pos, sizeof(age)), &age, sizeof(age)); /* update authentication and calculate checksum */ |