]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
6 years agoadd port of aiju's port of games/2600
qwx [Sat, 12 May 2018 17:21:48 +0000 (19:21 +0200)]
add port of aiju's port of games/2600

6 years agoadd libemu
qwx [Sat, 12 May 2018 17:20:53 +0000 (19:20 +0200)]
add libemu

move redundant code from emulators to a common library

6 years agoadd signed fixed size integer typedefs
qwx [Sat, 12 May 2018 17:19:52 +0000 (19:19 +0200)]
add signed fixed size integer typedefs

6 years agondb/dns: lookup *all* entries in dblookup(), v4 and v6 queries in parallel, remove...
cinap_lenrek [Fri, 11 May 2018 20:37:28 +0000 (22:37 +0200)]
ndb/dns: lookup *all* entries in dblookup(), v4 and v6 queries in parallel, remove weigthed timeouts

dblookup() used to only return the first matching entry. in
case of ipv6, we want all entries returned to get both v4
and v6 addresses... and these might not neccesarily be in
the same entry (see /lib/ndb/common). note also this makes
it behave the same as in cachedb mode which reads in the
whole database.

we do not know if v4 or v6 routing works, so the simplest
is just to query v4 and v6 nameservers in parallel. this is
done by changing serveraddrs() to return one address type,
and we make sure to get at least one v4 and one v6 address
each round.

get rid of the weigthed timeout code... there where too many
assumptions. instead, we give a round 500ms timeout (or 1 second
in patient mode) and honor the maximum query time.

6 years agomerge
cinap_lenrek [Fri, 11 May 2018 14:16:37 +0000 (16:16 +0200)]
merge

6 years agofix manpage cross references
cinap_lenrek [Fri, 11 May 2018 14:15:08 +0000 (16:15 +0200)]
fix manpage cross references

6 years agolibplumb: fix plumbunpackpartial()
cinap_lenrek [Thu, 10 May 2018 17:46:38 +0000 (19:46 +0200)]
libplumb: fix plumbunpackpartial()

- *morep was not set in error cases
- attr and ntext could be leaked

6 years agomerge
cinap_lenrek [Thu, 10 May 2018 17:38:01 +0000 (19:38 +0200)]
merge

6 years agoppp: set source specific default route regardless of primary flag, set link speed...
cinap_lenrek [Thu, 10 May 2018 17:36:14 +0000 (19:36 +0200)]
ppp: set source specific default route regardless of primary flag, set link speed thru new ctl message when -b is specified

6 years agoip: add some primitive rate limiting knobs to counteract bufferbloat
cinap_lenrek [Thu, 10 May 2018 17:31:58 +0000 (19:31 +0200)]
ip: add some primitive rate limiting knobs to counteract bufferbloat

6 years agoadd usb tablet support
aiju [Tue, 8 May 2018 08:28:48 +0000 (08:28 +0000)]
add usb tablet support

6 years agolibmp: add awk-generated tests
aiju [Sat, 5 May 2018 12:14:39 +0000 (12:14 +0000)]
libmp: add awk-generated tests

6 years agompdiv: get signs right...
aiju [Sat, 5 May 2018 12:03:45 +0000 (12:03 +0000)]
mpdiv: get signs right...

6 years agomp: more tests
aiju [Sat, 5 May 2018 08:49:38 +0000 (08:49 +0000)]
mp: more tests

6 years agompmagadd: oops...
aiju [Fri, 4 May 2018 21:42:08 +0000 (21:42 +0000)]
mpmagadd: oops...

6 years agompmagadd: force output sign +1 always
aiju [Fri, 4 May 2018 21:41:16 +0000 (21:41 +0000)]
mpmagadd: force output sign +1 always

6 years agompdiv: fix sign bug
aiju [Fri, 4 May 2018 21:18:46 +0000 (21:18 +0000)]
mpdiv: fix sign bug

6 years agopc: add $ operator
aiju [Fri, 4 May 2018 10:07:39 +0000 (11:07 +0100)]
pc: add $ operator

6 years agolibmp: add new tests
aiju [Fri, 4 May 2018 00:42:59 +0000 (00:42 +0000)]
libmp: add new tests

6 years agomplogic: don't drop carry out
aiju [Thu, 3 May 2018 23:31:24 +0000 (23:31 +0000)]
mplogic: don't drop carry out

6 years agopc(1): always allocate at least one mpdigit (itomp assumes this)
aiju [Thu, 3 May 2018 13:06:15 +0000 (14:06 +0100)]
pc(1): always allocate at least one mpdigit (itomp assumes this)

6 years agomerge
cinap_lenrek [Thu, 3 May 2018 10:28:41 +0000 (12:28 +0200)]
merge

6 years agolibplumb: fix old leak introduced in 18b8ed1a5ea3
mischief [Thu, 3 May 2018 08:26:09 +0000 (01:26 -0700)]
libplumb: fix old leak introduced in 18b8ed1a5ea3

6 years agoipconfig(8): clarify -p and -P options
cinap_lenrek [Thu, 3 May 2018 07:09:39 +0000 (09:09 +0200)]
ipconfig(8): clarify -p and -P options

6 years agogames/mines: chain new CLists in splitknown correctly
aiju [Wed, 2 May 2018 23:01:39 +0000 (23:01 +0000)]
games/mines: chain new CLists in splitknown correctly

6 years agogames/mines -g: elements taken from list should be -2, not -1
aiju [Wed, 2 May 2018 22:47:04 +0000 (22:47 +0000)]
games/mines -g: elements taken from list should be -2, not -1

6 years agoip/linklocal: invert the localadm bit from mac address instead of just setting it
cinap_lenrek [Wed, 2 May 2018 18:34:43 +0000 (20:34 +0200)]
ip/linklocal: invert the localadm bit from mac address instead of just setting it

6 years agoremove ipv6on, update ipconfig(8)
cinap_lenrek [Wed, 2 May 2018 18:29:29 +0000 (20:29 +0200)]
remove ipv6on, update ipconfig(8)

6 years agoip/ipconfig: fix exit status for ndbconfig
cinap_lenrek [Tue, 1 May 2018 22:03:54 +0000 (00:03 +0200)]
ip/ipconfig: fix exit status for ndbconfig

6 years agotermrc: fix mistake
cinap_lenrek [Tue, 1 May 2018 22:03:24 +0000 (00:03 +0200)]
termrc: fix mistake

6 years agotermrc: put #u in front for endpoint renaming to be effective, handle multipe ether...
cinap_lenrek [Tue, 1 May 2018 21:46:57 +0000 (23:46 +0200)]
termrc: put #u in front for endpoint renaming to be effective, handle multipe ether= tuples in ndb

6 years agomerge
cinap_lenrek [Tue, 1 May 2018 21:40:00 +0000 (23:40 +0200)]
merge

6 years agoip/ipconfig: populate /net/ndb from v6 router advertisements, configure multiple...
cinap_lenrek [Tue, 1 May 2018 21:32:28 +0000 (23:32 +0200)]
ip/ipconfig: populate /net/ndb from v6 router advertisements, configure multiple addresses in ndbconfig()

we now update /net/ndb with the following information gathered
from router advertisements (rfc6106 and plan9 specific options):

- recursive dns servers (option 25, ndb: dns=)
- dns search list (option 31, ndb: dnsdomain=)
- plan9 fileserver (option 250, ndb: fs=)
- plan9 authserver (option 251, ndb: auth=)

note the plan9 specific options can be disabled with the -G flag.

for ndbconfig (-N flag), we now collect all ip addresses in ndb
belonging to the devices mac address and configue them all. v6
addresses are getting added when a link local address exists
or the -6 flag has been specified to automatically configure one.

move the dhcp code in its own dhcp.c file and make symbols static
that are not used across modules.

6 years agondb/cs: fix crash in ndbredorder due to ndbnew() not maintaining the ->line ring
cinap_lenrek [Tue, 1 May 2018 20:17:27 +0000 (22:17 +0200)]
ndb/cs: fix crash in ndbredorder due to ndbnew() not maintaining the ->line ring

we have to maintain the ->line chain for ndbreorder() to work, so add
a little helper: ndbline() which replicates the ->entry chain and links
the last tuple to the first; makeing the whole list into a single line.

6 years agolibplumb: allow attributes larger than 4096, set some malloc tags
mischief [Tue, 1 May 2018 19:47:26 +0000 (12:47 -0700)]
libplumb: allow attributes larger than 4096, set some malloc tags

6 years agondb/csquery: insert \n between read chunks
cinap_lenrek [Sat, 28 Apr 2018 02:40:09 +0000 (04:40 +0200)]
ndb/csquery: insert \n between read chunks

6 years agoip/ppp: remove old struct
cinap_lenrek [Sat, 28 Apr 2018 02:39:09 +0000 (04:39 +0200)]
ip/ppp: remove old struct

6 years agolibndb: cleanup
cinap_lenrek [Sat, 28 Apr 2018 02:38:34 +0000 (04:38 +0200)]
libndb: cleanup

6 years agompdiv: fix dividing 0 by a small power of two
aiju [Thu, 26 Apr 2018 13:55:02 +0000 (14:55 +0100)]
mpdiv: fix dividing 0 by a small power of two

6 years agomerge
cinap_lenrek [Tue, 24 Apr 2018 19:25:16 +0000 (21:25 +0200)]
merge

6 years agodevip: improve arp and ndp code
cinap_lenrek [Tue, 24 Apr 2018 18:21:09 +0000 (20:21 +0200)]
devip: improve arp and ndp code

there appears to be confusion about the refresh flag of arpenter().
when we get an arp reply, it makes more sense to just refresh
waiting/existing entries instead creating a new one as we do not
know if we are going to communicate with the remote host in the future.

when we see an arp request for ourselfs however, we want to always
enter the senders address into the arp cache as it is likely the sender
attempts to communicate with us and with the arp entry, we can reply
immidiately.

reject senders from multicast/broadcast mac addresses. thats just silly.

we can get rid of the multicast/broadcast ip checks in ethermedium and
do it in arpenter() instead, checking the route type for the target to
see if its a non unicast target.

enforce strict separation of interface's arp entries by passing a
rlock'd ifc explicitely to arpenter, which we compare against the route
target interface. this makes sure arp/ndp replies only affect entries for
the receiving interface.

handle neighbor solicitation retransmission in nbsendsol() only. that is,
both ethermedium and the rxmitproc just call nbsendsol() which maintains
the timers and counters and handles the rotation on the re-transmission
chain.

6 years agoforp: fix ternary operator
aiju [Tue, 24 Apr 2018 11:58:54 +0000 (12:58 +0100)]
forp: fix ternary operator

6 years agolibsat, forp: fix va_list hack on amd64
aiju [Tue, 24 Apr 2018 11:20:07 +0000 (12:20 +0100)]
libsat, forp: fix va_list hack on amd64

6 years agodevip: fix ipv6 icmp unreachable handling, fix retransmit, fix ifc locking, remove...
cinap_lenrek [Sun, 22 Apr 2018 16:54:13 +0000 (18:54 +0200)]
devip: fix ipv6 icmp unreachable handling, fix retransmit, fix ifc locking, remove tentative check

6 years agodevip: cleanup ipmux.c
cinap_lenrek [Sun, 22 Apr 2018 16:50:45 +0000 (18:50 +0200)]
devip: cleanup ipmux.c

6 years agodevip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium
cinap_lenrek [Sun, 22 Apr 2018 16:50:11 +0000 (18:50 +0200)]
devip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium

6 years agodevip: cleanup rudp.c
cinap_lenrek [Sun, 22 Apr 2018 16:49:01 +0000 (18:49 +0200)]
devip: cleanup rudp.c

6 years agodevip: cleanup tcp.c
cinap_lenrek [Sun, 22 Apr 2018 16:48:32 +0000 (18:48 +0200)]
devip: cleanup tcp.c

6 years agodevip: cleanup udp.c
cinap_lenrek [Sun, 22 Apr 2018 16:48:08 +0000 (18:48 +0200)]
devip: cleanup udp.c

6 years agodevip: various icmp stuff
cinap_lenrek [Sun, 22 Apr 2018 16:47:19 +0000 (18:47 +0200)]
devip: various icmp stuff

no need to rlock ifc in targetttype() as we are called from icmpiput6(),
which the ifc rlocked.

for icmpadvise, the lport, destination *AND* source have to match.

a connection gets a packet when the packets destination matches the source
*OR* the packets source matches the destination.

6 years agodevip: verify ifcid on routehint check, check Route.ref for free'd routes
cinap_lenrek [Sun, 22 Apr 2018 16:42:22 +0000 (18:42 +0200)]
devip: verify ifcid on routehint check, check Route.ref for free'd routes

v4lookup() and v6lookup() do not acquire the routelock, so it is
possible to hit routes that are on the freelist. to detect these,
we set ref to 0 and check for this case, avoiding overriding the ifc.

re-evaluate routes when the ifcid on the route hint doesnt match.

6 years agodevip: add "reflect" ctl message, fix memory leaks in icmpv6, fix source address...
cinap_lenrek [Wed, 18 Apr 2018 23:08:51 +0000 (01:08 +0200)]
devip: add "reflect" ctl message, fix memory leaks in icmpv6, fix source address for icmpttlexceeded, cleanup

6 years agoip/ipconfig: always refresh ndb/cs and ndb/dns when adding or removing ip addresses
cinap_lenrek [Wed, 18 Apr 2018 23:01:39 +0000 (01:01 +0200)]
ip/ipconfig: always refresh ndb/cs and ndb/dns when adding or removing ip addresses

6 years agondb/dnsquery, ndb/csquery: handle long lines
cinap_lenrek [Wed, 18 Apr 2018 23:00:12 +0000 (01:00 +0200)]
ndb/dnsquery, ndb/csquery: handle long lines

6 years agofix parseip() error handling in ipconfig, ppp, tftpfs and dns
cinap_lenrek [Mon, 16 Apr 2018 23:34:10 +0000 (01:34 +0200)]
fix parseip() error handling in ipconfig, ppp, tftpfs and dns

6 years agondb/dns: remove single-ip-address assuptions
cinap_lenrek [Mon, 16 Apr 2018 22:48:42 +0000 (00:48 +0200)]
ndb/dns: remove single-ip-address assuptions

6 years agondb/cs: remove single-ip-address assumptions
cinap_lenrek [Mon, 16 Apr 2018 22:45:37 +0000 (00:45 +0200)]
ndb/cs: remove single-ip-address assumptions

6 years agoip/ipconfig: use unique ip/ipmask/ipgw values close to match for ndbconfig
cinap_lenrek [Sat, 14 Apr 2018 22:07:42 +0000 (00:07 +0200)]
ip/ipconfig: use unique ip/ipmask/ipgw values close to match for ndbconfig

6 years agondb/cs: remove paranoia debug toggle
cinap_lenrek [Sat, 14 Apr 2018 18:32:26 +0000 (20:32 +0200)]
ndb/cs: remove paranoia debug toggle

6 years agolibc: allow /net/cs to specify local address for dial()
cinap_lenrek [Sat, 14 Apr 2018 18:28:58 +0000 (20:28 +0200)]
libc: allow /net/cs to specify local address for dial()

6 years agoadd missing ethermii.h dependencies. patch from cinap_lenrek
kremlin [Thu, 12 Apr 2018 21:50:10 +0000 (17:50 -0400)]
add missing ethermii.h dependencies. patch from cinap_lenrek

6 years agocpurc: remove obsolete device binds, run diskparts after $sysname is known. remove...
cinap_lenrek [Thu, 12 Apr 2018 19:30:28 +0000 (21:30 +0200)]
cpurc: remove obsolete device binds, run diskparts after $sysname is known. remove /env/boottime. document.

6 years agoip/ipconfig: setup per local address default routes
cinap_lenrek [Wed, 11 Apr 2018 20:57:16 +0000 (22:57 +0200)]
ip/ipconfig: setup per local address default routes

6 years agodevip: make v4 ifc broadcast and multicast routes specific to address
cinap_lenrek [Wed, 11 Apr 2018 20:56:25 +0000 (22:56 +0200)]
devip: make v4 ifc broadcast and multicast routes specific to address

this allows one to access the same network via multiple interfaces,
the local address then determines which interface is used.

6 years agoip/gping: icmpv6 support
cinap_lenrek [Tue, 10 Apr 2018 18:04:20 +0000 (20:04 +0200)]
ip/gping: icmpv6 support

6 years agodevip: properly initialize the connection ignoreadvice and tos flags
cinap_lenrek [Tue, 10 Apr 2018 18:02:03 +0000 (20:02 +0200)]
devip: properly initialize the connection ignoreadvice and tos flags

6 years agoip/traceroute: icmpv6 support
cinap_lenrek [Tue, 10 Apr 2018 17:06:34 +0000 (19:06 +0200)]
ip/traceroute: icmpv6 support

6 years agoip/ping: stop doing clever things with dialstrings, just let cs/dial figure it out
cinap_lenrek [Mon, 9 Apr 2018 22:56:50 +0000 (00:56 +0200)]
ip/ping: stop doing clever things with dialstrings, just let cs/dial figure it out

6 years agoip(3): troff magic
cinap_lenrek [Sun, 8 Apr 2018 20:22:03 +0000 (22:22 +0200)]
ip(3): troff magic

6 years agoip(3): document changes on /net/arp and /net/iproute
cinap_lenrek [Sun, 8 Apr 2018 20:11:18 +0000 (22:11 +0200)]
ip(3): document changes on /net/arp and /net/iproute

6 years agoip/ipconfig: fix v6 ndp code, use source specific default routes
cinap_lenrek [Sun, 8 Apr 2018 19:16:29 +0000 (21:16 +0200)]
ip/ipconfig: fix v6 ndp code, use source specific default routes

6 years agodevip: implement source specific routing
cinap_lenrek [Sun, 8 Apr 2018 19:15:00 +0000 (21:15 +0200)]
devip: implement source specific routing

6 years agonusb/usbd: increase buffer size to capture port information
cinap_lenrek [Sun, 8 Apr 2018 18:51:48 +0000 (20:51 +0200)]
nusb/usbd: increase buffer size to capture port information

due to the addition of uframes property, the buffer got truncated
resulting in usbd not recognizing the number of roothub ports.

6 years agoremove duplicate -m definition in upasfs(4) (thanks rodri)
henesy [Fri, 6 Apr 2018 23:05:25 +0000 (18:05 -0500)]
remove duplicate -m definition in upasfs(4) (thanks rodri)

6 years agoape: improve assert macro
mischief [Tue, 3 Apr 2018 04:44:21 +0000 (21:44 -0700)]
ape: improve assert macro

in a statement such as:

if(expr)
assert(a);
else
assert(b);

the previous definition of assert would fail to compile, as the else
would be dangling.  with a ternary expression, this construct works
fine.

6 years ago9fs: break 9front case into several cases: 9front, 9bugs, 9contrib, 9grep
stanley lieber [Mon, 2 Apr 2018 23:54:58 +0000 (19:54 -0400)]
9fs: break 9front case into several cases: 9front, 9bugs, 9contrib, 9grep

6 years agoforp(1): document [] and some bugs
aiju [Sat, 31 Mar 2018 12:41:41 +0000 (12:41 +0000)]
forp(1): document [] and some bugs

6 years agoforp: fix precedence for []
aiju [Sat, 31 Mar 2018 12:30:48 +0000 (12:30 +0000)]
forp: fix precedence for []

6 years agogb*: reverse savegame field polarity
qwx [Sat, 31 Mar 2018 09:38:09 +0000 (11:38 +0200)]
gb*: reverse savegame field polarity

6 years agoblit,c64,gb*: fix phaser coolant leak during resize
qwx [Sat, 31 Mar 2018 09:37:25 +0000 (11:37 +0200)]
blit,c64,gb*: fix phaser coolant leak during resize

6 years agoadd forp(1) manpage
aiju [Wed, 28 Mar 2018 20:49:39 +0000 (20:49 +0000)]
add forp(1) manpage

6 years agosat.h: update to include satget
aiju [Wed, 28 Mar 2018 20:36:04 +0000 (20:36 +0000)]
sat.h: update to include satget

6 years agoforp: fix multiplication; change division to C semantics
aiju [Wed, 28 Mar 2018 20:14:29 +0000 (20:14 +0000)]
forp: fix multiplication; change division to C semantics

6 years agoadd forp
aiju [Wed, 28 Mar 2018 17:08:30 +0000 (17:08 +0000)]
add forp

6 years agolibsat: fix one of the satmore() bugs
aiju [Mon, 26 Mar 2018 21:39:23 +0000 (21:39 +0000)]
libsat: fix one of the satmore() bugs

6 years agolock(2): fix typo
Alex Musolino [Fri, 23 Mar 2018 01:04:39 +0000 (11:34 +1030)]
lock(2): fix typo

6 years agosat: satget: don't duplicate binary clauses
aiju [Thu, 22 Mar 2018 13:35:52 +0000 (13:35 +0000)]
sat: satget: don't duplicate binary clauses

6 years agosat: satget: include unit literals
aiju [Thu, 22 Mar 2018 13:15:44 +0000 (13:15 +0000)]
sat: satget: include unit literals

6 years agosat: add satget
aiju [Thu, 22 Mar 2018 12:46:04 +0000 (12:46 +0000)]
sat: add satget

6 years agosshfs: usage
aiju [Tue, 20 Mar 2018 20:51:04 +0000 (20:51 +0000)]
sshfs: usage

6 years agoresample(1): document -n option
aiju [Tue, 20 Mar 2018 20:31:25 +0000 (20:31 +0000)]
resample(1): document -n option

6 years agoman pages: SYNOPSYS typo
23hiro [Tue, 20 Mar 2018 17:24:26 +0000 (18:24 +0100)]
man pages: SYNOPSYS typo

6 years agolibsat: setmalloctag, fix incorrect allocation size
aiju [Tue, 20 Mar 2018 11:23:41 +0000 (11:23 +0000)]
libsat: setmalloctag, fix incorrect allocation size

6 years agodevip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup
cinap_lenrek [Mon, 19 Mar 2018 00:11:08 +0000 (01:11 +0100)]
devip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup

rfc4861 7.2.2:

If the source address of the packet prompting the solicitation is the
same as one of the addresses assigned to the outgoing interface, that
address SHOULD be placed in the IP Source Address of the outgoing
solicitation.

this change adds ndbsendsol() which handles the source address selection
and also handles the arp table locking; avoiding access to the arp entry
after the arp table is unlocked.

cleanups:

- use ipmove() instead of memmove().
- useless extern qualifiers

6 years agomerge
cinap_lenrek [Sun, 18 Mar 2018 06:53:10 +0000 (07:53 +0100)]
merge

6 years agodevip: more v6 improvements
cinap_lenrek [Sun, 18 Mar 2018 06:50:48 +0000 (07:50 +0100)]
devip: more v6 improvements

ipv4local() and ipv6local() now take remote address argument,
returning the closest local address to the source. this
implements the standartized source address selection rules
instead of just returning the first local v4 or v6 address.

the source address selection was broken for esp, rudp an udp,
blindly assuming ifc->lifc->local being a valid v4 address.
use ipv6local() instead.

the v6 routing code used to lookup source address route to
decide to drop the packet instead of checking the interface
on the destination route.

factor out the route hint from Conv and put it in Routehint
structure. avoiding stack bloat in v4 routing. implement the
same trick for v6 avoiding second route lookup in ipoput6.

fix memory leak in icmpv6 router solicitation handling.

remove old unfinished handling of multiple v6 routers. should
implement source specific routes instead.

avoid duplication, use common convipvers() function.

use isv4() instead of memcmp v4prefix.

6 years agoip/ipconfig: stop spamming the console about router receiving RA's
cinap_lenrek [Sun, 18 Mar 2018 06:31:09 +0000 (07:31 +0100)]
ip/ipconfig: stop spamming the console about router receiving RA's

6 years agoadd sat(1) command
aiju [Sun, 18 Mar 2018 03:03:12 +0000 (03:03 +0000)]
add sat(1) command

6 years agosatmore: don't try to override user defined variables
aiju [Sun, 18 Mar 2018 03:01:21 +0000 (03:01 +0000)]
satmore: don't try to override user defined variables

6 years agoadd #pragma incomplete to sat.h
aiju [Sun, 18 Mar 2018 01:15:07 +0000 (01:15 +0000)]
add #pragma incomplete to sat.h