From: "Lambrecht Jürgen" <J.Lambrecht@TELEVIC.com>
To: "ecos-devel@ecos.sourceware.org" <ecos-devel@ecos.sourceware.org>
Subject: RFC: bsd_tcp patch on in.c
Date: Thu, 27 Jun 2013 11:24:00 -0000 [thread overview]
Message-ID: <51CC20E1.3090502@televic.com> (raw)
Hello,
The patch below we already use since 2006.
We had problems with the TCP/IP stack directly after booting because it
already received packets before being initialized completely.
Here our CVS log:
move
splx(s);
from line 682 to line 739
so that tcp/ip stack has started up before the ethernet driver is released
(else the not-ready stack will already receive packets)
Do you agree this is a valid patch?
--------------------------------------------------------------------------------
Index: net/bsd_tcpip/current/src/sys/netinet/in.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/netinet/in.c,v
retrieving revision 1.4
diff -u -5 -p -r1.4 in.c
--- net/bsd_tcpip/current/src/sys/netinet/in.c 29 Jan 2009 17:49:56 -0000 1.4
+++ net/bsd_tcpip/current/src/sys/netinet/in.c 27 Jun 2013 11:03:38 -0000
@@ -675,11 +675,10 @@ in_ifinit(ifp, ia, sin, scrub)
(error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
splx(s);
ia->ia_addr = oldaddr;
return (error);
}
- splx(s);
if (scrub) {
ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
in_ifscrub(ifp, ia);
ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
}
@@ -733,10 +732,11 @@ in_ifinit(ifp, ia, sin, scrub)
struct in_addr addr;
addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP);
in_addmulti(&addr, ifp);
}
+ splx(s);
return (error);
}
/*
--------------------------------------------------------------------------------
Kind regards,
Jürgen
--
Jürgen Lambrecht
R&D Associate
Mobile: +32 499 644 531
Tel: +32 (0)51 303045 Fax: +32 (0)51 310670
http://www.televic-rail.com
Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825.539.581 - RPR Kortrijk
next reply other threads:[~2013-06-27 11:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 11:24 Lambrecht Jürgen [this message]
2013-06-27 13:43 ` Bernd Edlinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51CC20E1.3090502@televic.com \
--to=j.lambrecht@televic.com \
--cc=ecos-devel@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).