diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-04-21 04:02:53 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-04-21 04:02:53 +0000 |
commit | b44f8b28e455ac370ae86a7cdf5a178ea4e8644a (patch) | |
tree | d468d40f7ebdcf033b757367bd0170a8fb44df44 /usr.sbin | |
parent | efb64c197d29339f3ae2f2938d272f0e91059667 (diff) |
th_code is in network byte order
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tftpd/tftpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index b32b3e891f3..e08efc50363 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.18 2013/11/26 21:47:16 deraadt Exp $ */ +/* $OpenBSD: tftpd.c,v 1.19 2014/04/21 04:02:52 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@uq.edu.au> @@ -1376,7 +1376,7 @@ nak(struct tftp_client *client, int error) } if (pe->e_code < 0) { pe->e_msg = strerror(error - 100); - tp->th_code = EUNDEF; /* set 'undef' errorcode */ + tp->th_code = htons(EUNDEF); /* set 'undef' errorcode */ } length = strlcpy(tp->th_msg, pe->e_msg, client->packet_size - 5) + 5; |