Age | Commit message (Collapse) | Author |
|
the mtu negotiation seems wrong. it seems to assume
that the peer requests a mtu to us, but actually this
doesnt seem to be the case and if the peer doesnt
request it, we'd always use Defmntu of 1450, no
matter what we set on with -m option.
instead, we use the mtu specified with -m option
and always request it to the peer. if the peer requests
a different mtu we use that instead.
this at least gives some control and allows to just use
the correct mtu from pppoe (1492).
|
|
This only works when we'r not already having a interface
bound to that ethernet. Otherwise ipconfig can get
confused and adds the addresses to the wrong interface.
|
|
Change ip/ppp to call ip/ipconfig to add and remove
addresses to avoid duplicating code for removing
ndb entries and handling default routes as well as
allow ipv6 address auto-configuration.
|
|
This adds a very basic (probably wrong) DHCPv6 client,
to handle the "managed"-flag in IPv6 router solicitations.
We add -U option to pass the DHCPv6 client id as well as
an -s flag to manually add a dns server (because ppp
is going to call ipconfig to handle all the configuration
and write-back to /net/ndb in the future).
Have the remove command also remove default routes and
/net/ndb entries. (needed by ppp).
|
|
The ipifc->local generator is the big exception,
dumping the whole link structure of the interface.
|
|
for ipv6, we need to be able to set both v4 and v6
local and remote addresses:
local4
local6
local4 remote4
local6 remote6
local4 local6
local6 local4
local4 local6 remote4
local6 local4 remote6
local4 remote4 local6 remote6
local6 remote6 local4 remote4
|
|
|
|
when reading the status files from a conversation, ipread()
allocates a temporary buffer and calls the protocols
generator to fill the buffer and the calls
readstr() to handle the read request.
if the generator or readstr() erors, we must free the
temporary buffer.
also, allocate a more reasonable size for the "local"
and "remote" strings. allocating and zeroing 32K big
buffers for them is excessive.
|
|
|
|
|
|
register (from3)
|
|
|
|
|
|
|
|
relax the maclen check as v6 neighbour disicovery might
give bigger buffers as the medium uses for the mac
address size, as the packet does not contain exact byte
count but rounds all the options to multiples of 8.
drop neighbour discovery packets coming from interfaces
with zero-length maclen.
when dialing icmpv6 protocol with link-local address
for the local ip address, filter any packets to it that
come from a different interface. otherwise ipconfig
would see router advertisements from other interfaces.
fix the locking for ipifc ctl messages: properly
acquire the wlock and check that the interface is still
bound for every ctl messages touching the interface.
make add6 ipifc ctl message work for media with
zero-length maclen by using the interface identier
from pre-existing link-local address when available.
|
|
|
|
|
|
|
|
|
|
the previous change introduces a out of bounds access
as it does not change n.
it is also conceptually wrong because this routine is
supposed to just verify the structure. as later getopts()
is *NOT* going to deal with malfored TLV's.
this actually replaces the android magic garbage with
OBpad bytes, which getopts() later will handle correctly
and makes sure the garbage is fully contained within
the buffer boundaries.
thanks sigrid for testing.
|
|
|
|
|
|
|
|
establish ipv6 link-local addresses if supported.
to get a full prefix, one would need to do dhcpv6
or using slaac configuration. this will come later.
remove ipv4 default route on exit.
maintain the entries in /net/ndb on ip change and
also remove them on exit.
dont filter source address, this should be done
differently.
fix various bugs in the option iteration loops.
honour primary flag (it used to just ignore that
and set it unasked in the code... what the hell...)
|
|
|
|
The samaddr definitions in the other compilers have
the return type marked correctly.
|
|
By default by writing the p9sk1 key out in to nvram, factotum would read it
and offer p9sk1 authentication for hostowner. This authentication will happen
regardless of the authsrv configuration. This change makes readnvram ask
if the user would like to use p9sk1 with a default of no.
|
|
not a bug, just make it easier to keep drawtem code and libsec
in sync...
|
|
avoid dynamic code generating syswr() in the hot path...
|
|
avoid the dynamic code generating syswr() in the hot path...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Send lcp echo request every 5 seconds
and terminate if we do not get any reply
after 12 seconds.
On protocol termination, exit all the processes
using a note and log a reason.
Cleanup.
|
|
register twice
|
|
This code seems to be for the specific case of when
mips 3000 binaries were being run on a mips 4000 kernel.
As far as I know, our only current mips magic refers to the
5000 (at least), and the 4000 specific magic formats are mostly a relic.
There is currently no bootable system in which this code
path is correct. In any case, hardcoding /proc/1 is not the solution.
|
|
|
|
|
|
R1, R1)
|
|
test case:
void
main(int, char **)
{
union {
float f;
u32int u;
}x;
x.u = 1U<<31;
print("%d %d\n", !x.f, x.f == 0.0f);
exits(nil);
}
|
|
|
|
|
|
|
|
|
|
Add some checks in the interrupt handler to ensure
that the slot and ring referred to by the event have
been initialized.
Also add a check in ctlrcmd() just in case we mess
up the recovery and someone issues a ctlrcmd() after
a failed xhciinit().
|
|
check error for devread() and do some sanity checking
on the constants and dont leak the Dosbpb when error.
|
|
When a ring wraps around, we need to program a wrap around
td with the base address. To get the base, we need to call
Ctlr.dmaaddr() and we used the slot->ctlr pointer to get to
it.
But the command ring has no slot associated to it so we would
crash as soon as we tried to submit more than 256 controller
commands.
The solution is to put a ctlr pointer into the Ring structure,
which also allows us to simplify resetring() and waittd()
as they now can get the controller implicitely thru the ring
pointer.
|