diff options
| author | 2014-04-21 04:02:52 +0000 | |
|---|---|---|
| committer | 2014-04-21 04:02:52 +0000 | |
| commit | 89df2fcb41d97b9f1d4ec032e71c34067db5ec04 (patch) | |
| tree | 74be04caae8a0cdfdea9870a4c7279026b5072da /usr.sbin/tftpd/tftpd.c | |
| parent | clean up files we don't need (diff) | |
| download | wireguard-openbsd-89df2fcb41d97b9f1d4ec032e71c34067db5ec04.tar.xz wireguard-openbsd-89df2fcb41d97b9f1d4ec032e71c34067db5ec04.zip | |
th_code is in network byte order
Diffstat (limited to 'usr.sbin/tftpd/tftpd.c')
| -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; |
