Commit graph

5987 commits

Author SHA1 Message Date
qwx
198f10bb25 snes: fix input botch 2 2018-06-09 07:12:43 +02:00
qwx
54ac2c2871 snes: fix input botch 2018-06-09 07:08:43 +02:00
mischief
9a7b1b57b6 mklib: add %.acid target 2018-06-08 16:48:31 +00:00
mischief
59994e1beb avl(2): add avlmin/avlmax in synopsis 2018-06-08 16:37:39 +00:00
cinap_lenrek
ff1a1e63a8 getuser(2): add source or sysname() 2018-06-03 23:46:47 +02:00
cinap_lenrek
56ffc907ac kernel: stop the practice of passing DMDIR to devir() perm argument
devdir internally replicates the qid in ther perm stat field
already and the practice of explicitely passing just causing
confusion when done inconsistently.
2018-06-03 23:33:35 +02:00
cinap_lenrek
8c70c09bfd devaoe: fix dotdot walk in devlinkdir, make perms consistent 2018-06-03 23:30:57 +02:00
cinap_lenrek
a2623fd82a devenv: make #ec files not show up as world writable 2018-06-03 23:30:05 +02:00
cinap_lenrek
182077ac24 ip/dhcpd: parseip() error handling, make sure client ip is ipv4, add explicit length arguments to lookupname() and lookupserver() 2018-06-03 20:52:10 +02:00
cinap_lenrek
0cf8a0c4a8 ip/ipconfig: use ipmove() instead of memmove() 2018-06-03 20:31:48 +02:00
aiju
55edec2b8a tcs: support EUC-JP JIS X 0212 codes 2018-06-02 00:02:29 +00:00
cinap_lenrek
5db80edcd1 merge 2018-06-01 23:54:44 +02:00
cinap_lenrek
7113f730de ndb/cs: make ipv6 only host practical by checking ip version on local interfaces
avoid returning ip addresses that cannot be reached due
to lack of a compatible ip address. this means when here
is no ipv4 address configured, we wont return ipv4 addresses
and would not query dns for an A record.

likewise, when here is no ipv6 address configured then
we wont query dns for an AAAA record.

ipv6 lookups can still be disabled with the -4 flag just
as before.
2018-06-01 23:53:09 +02:00
qwx
50b36c5112 doom: don't set repl if scale is 1 2018-05-31 05:11:33 +02:00
cinap_lenrek
16c87febd3 sdram: properly support multiple ramdisks, so that ramdiskX corresponds to sdZX 2018-05-29 22:50:04 +02:00
qwx
f1eb657db0 emulators ui: don't call flushmouse twice 2018-05-29 05:28:31 +02:00
spew
3d0ebdc439 6c, 8c: Fix nocast cast bug which prevents address arithmetic from being computed at compile time 2018-05-28 19:38:33 -04:00
cinap_lenrek
6b22a732e8 merge 2018-05-27 23:05:00 +02:00
cinap_lenrek
8f9642a514 9boot: detect SYSLINUX "memdisk" and pass to kernel via ramdisk0= parameter
this makes virtual "memdisk" from SYSLINUX accessible to
the kernel, allowing the iso to be loaded via TFTP and
started without any ethernet or disk drivers available.
2018-05-27 23:03:38 +02:00
cinap_lenrek
5da4f0fc0f sdram: experimental ramdisk driver
this driver makes regions of physical memory accessible as a disk.

to use it, ramdiskinit() has to be called before confinit(), so
that conf.mem[] banks can be reserved. currently, only pc and pc64
kernel use it, but otherwise the implementation is portable.

ramdisks are not zeroed when allocated, so that the contents are
preserved across warm reboots.

to not waste memory, physical segments do not allocate Page structures
or populate the segment pte's anymore. theres also a new SG_CHACHED
attribute.
2018-05-27 22:59:19 +02:00
aiju
52698c726c sshfs(4): language 2018-05-27 11:22:23 +00:00
aiju
6c44dbe4fd sshfs(4): don't drink and troff 2018-05-27 11:09:01 +00:00
aiju
41013392a1 sshfs(4): replace the much maligned -r option 2018-05-27 11:06:07 +00:00
spew
1ddf581f8c cc: fix result of operation not used warning for void casts 2018-05-24 19:31:55 -04:00
aiju
434fc6a1c4 dc(1): add pi program as example 2018-05-24 15:42:43 +01:00
aiju
1984f6813c merge 2018-05-24 13:41:08 +01:00
aiju
be3809866c ape: floating point improvements (thanks spew) 2018-05-24 13:40:44 +01:00
cinap_lenrek
ad7390dda8 ndb/dnsdebug: handle .ip6.arpa names 2018-05-23 19:44:12 +02:00
cinap_lenrek
03ced8cca1 ndb/dnsquery: handle .ip6.arpa names, don't mount the dns service 2018-05-23 19:43:45 +02:00
cinap_lenrek
d5c906f515 ip/tftpd: deal with block wrap arround 2018-05-22 01:53:15 +02:00
cinap_lenrek
66eac7d687 pc64: fix fpu bug
fpurestore() unconditionally changed fpstate to FPinactive when
the kernel used the FPU. but in the FPinit case, the registers are
not saved by mathemu(), resulting in all zero initialized registers
being loaded once userspace uses the FPU so the process would have
wrong MXCR value.

the index overflow check was wrong with using shifted value.
2018-05-21 19:23:54 +02:00
cinap_lenrek
930efe67e8 ape: fix auth.h 2018-05-20 23:22:41 +02:00
cinap_lenrek
e69cde3120 authsrv: implement AuthNTLM 2018-05-20 22:59:24 +02:00
cinap_lenrek
87617ea25e merge 2018-05-20 22:50:50 +02:00
cinap_lenrek
6e19d19285 separate MSCHAP(v2) and NTLM(v2) authentication
due to linux omiting the final Z(4) in the NTLMv2 reply, and
the need for the windom for LMv2 authentication, here is a new
AuthNTLM ticket request now with length and dom fields.
2018-05-20 22:49:24 +02:00
qwx
2e717a5557 camv: fix leak on resize 2018-05-20 16:47:41 +02:00
aiju
1f8d347c92 fplot: draw axes; zoom more naturally; unzoom 2018-05-20 09:14:16 +00:00
cinap_lenrek
40f6e00b9c ip/cifsd: limit response data count in TRANS2 for remotebuffersize, avoid empty filename for the root 2018-05-20 03:48:33 +02:00
cinap_lenrek
e684b2a3fb authsrv: work arround linux omiting final Z(4) after the AvrPairs 2018-05-20 01:37:38 +02:00
cinap_lenrek
58aba2a67f cifsd: fix ntlmv2 authentication
in ntlmv2, the client will retry the challenge response trying a bunch
of different domain names assuming the same server challenge. so we have
to make retries work with factotum and the auth server.

also, windows 7 with compatlevel=4 sends all zeros LM response.
2018-05-19 16:40:01 +02:00
spew
a59aa24a94 merge 2018-05-18 21:39:19 -04:00
spew
9360415d56 ssh:add -r for extra raw mode 2018-05-18 21:36:33 -04:00
cinap_lenrek
530ab11783 merge 2018-05-16 21:43:29 +02:00
cinap_lenrek
6e284eaad5 ndb/cs: prevent deadlock with ndb/cs by mounting /srv/dns *AFTER* /net
the dnsquery() library function should not start mouting /srv/dns on
its own. this problem arrises only for ndb/cs as it is started before
ndb/dns.

the issue with mounting /srv/dns before /net is when ndb/cs attempts
to read the list of interfaces, accessing /net/ipifc, which triggers
a rpc to ndb/dns as it is ontop of the mount. this can yield a deadlock
when ndb/dns blocks its 9p loop waiting for requests to complete on
a refresh and the requests are stuck waiting for ndb/cs to translate
a dial string for announce().
2018-05-16 21:41:42 +02:00
aiju
b8430d5395 sshfs: if we're going to annoy everyone we should at least match documentation 2018-05-15 16:19:28 +01:00
cinap_lenrek
5c2b4dfc81 9boot: DHCPv6 support for efi 2018-05-15 02:18:50 +02:00
qwx
c83a6f9c00 emulators ui: fix input botch and typo 2018-05-14 20:49:08 +02:00
cinap_lenrek
7e33a75e36 merge 2018-05-14 19:19:50 +02:00
cinap_lenrek
c9bb6f68eb devip: don't set mtu of interface to zero when not specified (thanks joe9)
change 9f74a951ae6a introduced a bug that set the mtu of a new
interface to 0 when not specified in the add ctl.
2018-05-14 19:18:13 +02:00
BurnZeZ
f44cfeb7d7 audio/pcmconv: fix accidental cast to float instead of double 2018-05-13 19:58:16 +00:00
qwx
19d6a98038 ape: add signed fixed size integer typedefs to u.h 2018-05-13 07:13:00 +02:00
qwx
88537cfe9b demote libemu to common code
- too small, nothing else that won't be under /games will use it
- "libemu" as a name doesn't make sense here
2018-05-13 07:01:47 +02:00
qwx
abf8c8bf2c add port of aiju's port of games/2600 2018-05-12 19:21:48 +02:00
qwx
1195ca910c add libemu
move redundant code from emulators to a common library
2018-05-12 19:20:53 +02:00
qwx
70c7a9eb07 add signed fixed size integer typedefs 2018-05-12 19:19:52 +02:00
cinap_lenrek
2728e06589 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.
2018-05-11 22:37:28 +02:00
cinap_lenrek
d5cf062e7a merge 2018-05-11 16:16:37 +02:00
cinap_lenrek
4c9cbe484d fix manpage cross references 2018-05-11 16:15:08 +02:00
cinap_lenrek
f428a5daaa libplumb: fix plumbunpackpartial()
- *morep was not set in error cases
- attr and ntext could be leaked
2018-05-10 19:46:38 +02:00
cinap_lenrek
fcb974af3a merge 2018-05-10 19:38:01 +02:00
cinap_lenrek
eb3951bcd4 ppp: set source specific default route regardless of primary flag, set link speed thru new ctl message when -b is specified 2018-05-10 19:36:14 +02:00
cinap_lenrek
298f239695 ip: add some primitive rate limiting knobs to counteract bufferbloat 2018-05-10 19:31:58 +02:00
aiju
0e5888a0cf add usb tablet support 2018-05-08 08:28:48 +00:00
aiju
ec60da4961 libmp: add awk-generated tests 2018-05-05 12:14:39 +00:00
aiju
a7a07b2d43 mpdiv: get signs right... 2018-05-05 12:03:45 +00:00
aiju
0930daf295 mp: more tests 2018-05-05 08:49:38 +00:00
aiju
72ad2d1ee1 mpmagadd: oops... 2018-05-04 21:42:08 +00:00
aiju
35065b9127 mpmagadd: force output sign +1 always 2018-05-04 21:41:16 +00:00
aiju
8dc43a951c mpdiv: fix sign bug 2018-05-04 21:18:46 +00:00
aiju
454d26a0e4 pc: add $ operator 2018-05-04 11:07:39 +01:00
aiju
fa028a9352 libmp: add new tests 2018-05-04 00:42:59 +00:00
aiju
cda7129cd2 mplogic: don't drop carry out 2018-05-03 23:31:24 +00:00
aiju
98a5fc6535 pc(1): always allocate at least one mpdigit (itomp assumes this) 2018-05-03 14:06:15 +01:00
cinap_lenrek
2cfc72db76 merge 2018-05-03 12:28:41 +02:00
mischief
12716019bf libplumb: fix old leak introduced in 18b8ed1a5ea3 2018-05-03 01:26:09 -07:00
cinap_lenrek
b2599999be ipconfig(8): clarify -p and -P options 2018-05-03 09:09:39 +02:00
aiju
02e584c06c games/mines: chain new CLists in splitknown correctly 2018-05-02 23:01:39 +00:00
aiju
28c519295f games/mines -g: elements taken from list should be -2, not -1 2018-05-02 22:47:04 +00:00
cinap_lenrek
87d922589d ip/linklocal: invert the localadm bit from mac address instead of just setting it 2018-05-02 20:34:43 +02:00
cinap_lenrek
0c7a3ad1c9 remove ipv6on, update ipconfig(8) 2018-05-02 20:29:29 +02:00
cinap_lenrek
2247741fe0 ip/ipconfig: fix exit status for ndbconfig 2018-05-02 00:03:54 +02:00
cinap_lenrek
8f91d94d19 merge 2018-05-01 23:40:00 +02:00
cinap_lenrek
190c40c9ff 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.
2018-05-01 23:32:28 +02:00
cinap_lenrek
8e53fe132e 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.
2018-05-01 22:17:27 +02:00
mischief
d05b90f300 libplumb: allow attributes larger than 4096, set some malloc tags 2018-05-01 12:47:26 -07:00
cinap_lenrek
bc4469e5d2 ndb/csquery: insert \n between read chunks 2018-04-28 04:40:09 +02:00
cinap_lenrek
af3fd92789 ip/ppp: remove old struct 2018-04-28 04:39:09 +02:00
cinap_lenrek
dbfb320566 libndb: cleanup 2018-04-28 04:38:34 +02:00
aiju
e87ca8d976 mpdiv: fix dividing 0 by a small power of two 2018-04-26 14:55:02 +01:00
cinap_lenrek
69298c79ab merge 2018-04-24 21:25:16 +02:00
cinap_lenrek
5aae3d344b 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.
2018-04-24 20:21:09 +02:00
aiju
3c53021357 forp: fix ternary operator 2018-04-24 12:58:54 +01:00
aiju
29f03ba4e7 libsat, forp: fix va_list hack on amd64 2018-04-24 12:20:07 +01:00
cinap_lenrek
20b9326dad devip: fix ipv6 icmp unreachable handling, fix retransmit, fix ifc locking, remove tentative check 2018-04-22 18:54:13 +02:00
cinap_lenrek
c80d94304d devip: cleanup ipmux.c 2018-04-22 18:50:45 +02:00
cinap_lenrek
8962551055 devip: increment in counter *AFTER* acquiering the ifc lock or loopbackmedium 2018-04-22 18:50:11 +02:00
cinap_lenrek
dbf13129a7 devip: cleanup rudp.c 2018-04-22 18:49:01 +02:00
cinap_lenrek
9860172fce devip: cleanup tcp.c 2018-04-22 18:48:32 +02:00
cinap_lenrek
c5c613357e devip: cleanup udp.c 2018-04-22 18:48:08 +02:00
cinap_lenrek
26aca332bb 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.
2018-04-22 18:47:19 +02:00