projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Van's suggestion: add a means to let kernel set IP header ident #
[unix-history]
/
usr
/
src
/
sys
/
netinet
/
raw_ip.c
diff --git
a/usr/src/sys/netinet/raw_ip.c
b/usr/src/sys/netinet/raw_ip.c
index
72c1e03
..
5bef516
100644
(file)
--- a/
usr/src/sys/netinet/raw_ip.c
+++ b/
usr/src/sys/netinet/raw_ip.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)raw_ip.c 7.1
2
(Berkeley) %G%
+ * @(#)raw_ip.c 7.1
3
(Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
@@
-127,6
+127,9
@@
rip_output(m, so, dst)
ip->ip_ttl = MAXTTL;
opts = inp->inp_options;
} else {
ip->ip_ttl = MAXTTL;
opts = inp->inp_options;
} else {
+ ip = mtod(m, struct ip *);
+ if (ip->ip_id == 0)
+ ip->ip_id = htons(ip_id++);
opts = NULL;
/* XXX prevent ip_output from overwriting header fields */
flags |= IP_RAWOUTPUT;
opts = NULL;
/* XXX prevent ip_output from overwriting header fields */
flags |= IP_RAWOUTPUT;