From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: my 5.15.93 kernel keeps rebooting
Date: Thu, 16 Feb 2023 09:33:30 -0500 [thread overview]
Message-ID: <CAGfcS_n=1WtqjettUxmPEDAZSfhki8Jg_SubL4JLmY4qUaApjw@mail.gmail.com> (raw)
In-Reply-To: <m3o7pt66u1.wl-covici@ccs.covici.com>
On Thu, Feb 16, 2023 at 9:08 AM John Covici <covici@ccs.covici.com> wrote:
>
> hmmm, but what should I use for the source ip, I only assign those
> when I bring the interface up when I start the interface -- I have
> something like this:
> [Unit]
> Description=Network Connectivity for %i
> ...
> So, before I run this, I don't think the card has any ip address, does
> it?
So, "cards" don't have an IP address. The kernel assigns an IP
address to an interface, which is entirely a software construct. It
happens to be a software construct that the network console feature
largely ignores anyway.
I didn't go reading the source code, but I'm guessing it is just
constructing raw UDP packets and it will happily set the IP to
whatever you want it to be. After all, it is just a field on the
packet.
So you can make the source IP whatever you want it to be. Just expect
the packets to show up with the IP you set on them. There is no
connection, so the IP doesn't need to be reachable by anything else.
You could stick literally anything in there as long as some firewall
isn't going to object and drop the packet. The destination IP matters
because that is where it is going to go, and the interface matters
because if it gets sent out on the wrong interface then obviously it
won't make it there.
I have no idea if the netconsole packets get seen by netfilter, but if
this is on some kind of router that might be something you need to
check, because if netfilter is configured to drop unassociated UDP
from the firewall to the LAN that could be an issue. However, it is
possible this just bypasses netfilter entirely.
If you have the dynamic netconsole option enabled you could have a
script update the settings after your network is up to set the source
IP to the one assigned by DHCP and make sure it is on the right
interface. As you point out though at boot time the interface won't
have an IP. It won't even be "up," not that this is likely to bother
the kernel.
--
Rich
prev parent reply other threads:[~2023-02-16 14:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 14:08 [gentoo-user] my 5.15.93 kernel keeps rebooting John Covici
2023-02-14 19:08 ` Rich Freeman
2023-02-14 19:54 ` John Covici
2023-02-14 21:25 ` Rich Freeman
2023-02-14 22:04 ` John Covici
2023-02-15 14:50 ` [gentoo-user] " Grant Edwards
2023-02-15 15:19 ` John Covici
2023-02-16 17:37 ` Laurence Perkins
2023-02-17 19:03 ` John Covici
2023-02-17 20:13 ` Mark Knecht
2023-02-17 21:30 ` John Covici
2023-04-16 10:09 ` John Covici
2023-04-16 10:28 ` John Covici
2023-02-15 16:42 ` Grant Edwards
2023-02-16 11:50 ` John Covici
2023-02-16 12:11 ` Rich Freeman
2023-02-16 14:08 ` John Covici
2023-02-16 14:17 ` Mark Knecht
2023-02-16 14:33 ` Rich Freeman [this message]
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='CAGfcS_n=1WtqjettUxmPEDAZSfhki8Jg_SubL4JLmY4qUaApjw@mail.gmail.com' \
--to=rich0@gentoo.org \
--cc=gentoo-user@lists.gentoo.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