aboutsummaryrefslogtreecommitdiff
path: root/pfinet
Commit message (Collapse)AuthorAgeFilesLines
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-036-8/+8
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* pfinet: Fix shifting left into bit 31Samuel Thibault2023-02-234-6/+6
|
* pfinet: Align packetsSamuel Thibault2023-02-193-2/+28
| | | | | | The Ethernet header is 14 bytes long, and thus leads to IP header misalignment. This uses skb_reserve to introduce 2 bytes of padding to realign IP headers.
* pfinet: Fix using uninitialized valueSamuel Thibault2023-01-011-1/+1
|
* Remove duplicate pfinet linux headers that have glue versionsFlavio Cruz2022-11-0633-5044/+0
| | | | Message-Id: <Y2NNAegVOKg/X7OC@viriathus>
* pfinet: Fix warningSamuel Thibault2022-09-221-4/+3
|
* rioctl: Use r not i group ioctl for SIOCADDRT/SIOCDELRTDamien Zammit2022-09-224-3/+8
| | | | Message-Id: <20220922004105.961869-1-damien@zamaudio.com>
* Use route.h from glibcSamuel Thibault2022-09-213-43/+9
| | | | | | Unfortunately the Linux source also uses <net/route.h>, so we have to both make that include the glibc-provided one, and avoid making it emit Linuxish definitions when they would conflict with glibc definitions.
* Add new RPC for pfinet network routesDamien Zammit2022-09-116-4/+214
| | | | Message-Id: <20220909094234.517165-1-damien@zamaudio.com>
* pfinet: Factorize preparing the route requestSamuel Thibault2022-08-291-71/+57
|
* pfinet: Add SIOCADDRT and SIOCDELRT equivalent iioctlsDamien Zammit2022-08-292-100/+286
| | | | | | | | | | | | | | | | | | | | | | | | Using a new client side <net/route.h> I was able to clean up the existing options.c in pfinet and add two new ioctls for adding/deleting network routes. /* move to bits/ioctl.h */ struct ifrtreq { char ifname[IFNAMSIZ]; in_addr_t rt_dest; in_addr_t rt_mask; in_addr_t rt_gateway; int rt_flags; int rt_metric; int rt_mtu; int rt_window; int rt_irtt; int rt_tos; int rt_class; }; Message-Id: <20220829102952.369798-1-damien@zamaudio.com>
* Fix types of read write and readables methodsEtienne Brateau2022-08-293-16/+16
| | | | Message-Id: <20220829193617.13481-1-etienne.brateau@gmail.com>
* Drop ip_mreqn structureSamuel Thibault2022-08-131-7/+0
| | | | This is to be defined in the glibc header.
* pfinet: Increase default max buffer size to 256k, like on LinuxSamuel Thibault2022-08-131-2/+2
|
* Fix warningSamuel Thibault2022-02-121-1/+1
| | | | | * pfinet/socket-ops.c (S_socket_setopt): Cast data into char* before passing it to Linux' setsockopt which erroneously takes a char*.
* Fix warningSamuel Thibault2022-02-122-2/+2
| | | | | | * pfinet/io-ops.c (S_io_write), pfinet/socket-ops.c (S_socket_send): Cast const void * pointer to void * when using it in struct iovec which always uses a void* even when writing.
* Fix const warningsSamuel Thibault2022-01-171-1/+1
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* Make RPC input array parameters constSamuel Thibault2022-01-164-16/+16
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* Fix build warningsSamuel Thibault2022-01-014-8/+8
| | | | No actual behavior change.
* pfinet: Fix IPV6 option valuesSamuel Thibault2022-01-011-2/+8
| | | | | pfinet is providing the RFC2292 IPv6 options interface, not the RFC3542 interface, so we have to use the old option numbers here.
* pfinet: fix a missed 'return' keyword.Guy-Fleury Iteriteka2021-01-231-0/+2
| | | | | | * pfinet/ethernet.c(ethernet_close): Add 'return 0;' at the end of function. Message-Id: <20210123221255.11791-2-gfleury@disroot.org>
* pfinet: fix missed include files.Guy-Fleury Iteriteka2021-01-231-1/+2
| | | | | | * pfinet/glue-include/linux/socket.h: include '<string.h>' for 'memcpy' and '<stdlib.h>' for 'abort'. Message-Id: <20210123221255.11791-1-gfleury@disroot.org>
* Remove remnants of cthreadsSamuel Thibault2020-11-111-1/+1
| | | | | | | | | | * doc/hurd.texi: Index pthread.h instead of cthreads.h * libports/Makefile (SRCS): Drop stubs.c. * libports/stubs.c: Remove file. * mach-defpager/default_pager.c (default_pager): Drop disabled cthreads calls. * pfinet/kmem_cache.c: Fix comment. * proc/stubs.c: Fix comments.
* Fix build with -fno-commonSamuel Thibault2020-03-312-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with #
* pfinet: Fix buildSamuel Thibault2020-01-051-0/+1
| | | | * pfinet/socket.c: Define _HACK_ERRNO_H to get a proper errno definition.
* pfinet: Fix buildSamuel Thibault2020-01-051-6/+4
| | | | | | | errno is also used by glue headers, so we can not actually check it * pfinet/io-ops.c (S_io_reauthenticate): Do not check that it's EINTR that make_sock_user failed with.
* lwip,pfinet: Make S_io_reauthenticate return errorSamuel Thibault2020-01-051-1/+1
| | | | | | * lwip/io-ops.c (lwip_S_io_reauthenticate): Return errno on make_sock_user returning an error. * pfinet/io-ops.c (S_io_reauthenticate): Likewise.
* lwip,pfinet: Fix crash on make_sock_user getting EINTRSamuel Thibault2020-01-052-2/+12
| | | | | | | | | | | _ports_create_port_internal may return EINTR. * lwip/port-objs.c (make_sock_user): Set errno when ports_create_port returns an error. * pfinet/socket.c (make_sock_user): Likewise. * lwip/io-ops.c (lwip_S_io_reauthenticate): Loop while make_sock_user errors with EINTR. * pfinet/io-ops.c (S_io_reauthenticate): Likewise.
* Use the data_t type defined in hurd_types.h.Flavio Cruz2019-09-014-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * boot/boot.c: Replace char* with data_t. * console-client/trans.c: Likewise. * exec/exec.c: Likewise. * ext2fs/storeinfo.c: Likewise. * fatfs/inode.c: Likewise. * fatfs/main.c: Likewise. * isofs/inode.c: Likewise. * libdiskfs/boot-start.c: Likewise. * libdiskfs/dir-readdir.c: Likewise. * libdiskfs/file-exec.c: Likewise. * libdiskfs/file-get-fs-opts.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-set-trans.c: Likewise. * libdiskfs/fsys-forward.c: Likewise. * libdiskfs/fsys-getfile.c: Likewise. * libdiskfs/fsys-options.c: Likewise. * libdiskfs/io-read.c: Likewise. * libdiskfs/io-write.c: Likewise. * libnetfs/dir-readdir.c: Likewise. * libnetfs/file-exec.c: Likewise. * libnetfs/file-get-fs-options.c: Likewise. * libnetfs/file-get-storage-info.c: Likewise. * libnetfs/file-get-translator.c: Likewise. * libnetfs/file-set-translator.c: Likewise. * libnetfs/fsstubs.c: Likewise. * libnetfs/fsys-get-options.c: Likewise. * libnetfs/fsys-set-options.c: Likewise. * libnetfs/fsysstubs.c: Likewise. * libnetfs/io-read.c: Likewise. * libnetfs/io-write.c: Likewise. * libtrivfs/dir-readdir.c: Likewise. * libtrivfs/file-get-fs-options.c: Likewise. * libtrivfs/file-get-storage-info.c: Likewise. * libtrivfs/file-get-trans.c: Likewise. * libtrivfs/file-getfh.c: Likewise. * libtrivfs/file-set-trans.c: Likewise. * libtrivfs/fsys-forward.c: Likewise. * libtrivfs/fsys-get-options.c: Likewise. * libtrivfs/fsys-set-options.c: Likewise. * libtrivfs/fsys-stubs.c: Likewise. * libtrivfs/io-read.c: Likewise. * libtrivfs/io-write.c: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/pfinet-ops.c: Likewise. * pfinet/socket-ops.c: Likewise. * pfinet/tunnel.c: Likewise. * pflocal/io.c: Likewise. * pflocal/pf.c: Likewise. * pflocal/socket.c: Likewise. * proc/info.c: Likewise. * startup/startup.c: Likewise. * storeio/io.c: Likewise. * term/users.c: Likewise. * tmpfs/node.c: Likewise. * trans/crash.c: Likewise. * trans/fakeroot.c: Likewise. * trans/fifo.c: Likewise. * trans/firmlink.c: Likewise. * trans/hello-mt.c: Likewise. * trans/hello.c: Likewise. * trans/mtab.c: Likewise. * trans/new-fifo.c: Likewise. * trans/null.c: Likewise. * trans/proxy-defpager.c: Likewise. * trans/streamio.c: Likewise.
* Hurd patches (fix compilation)Luca Weiss2018-06-131-0/+1
| | | | | | | | | | | | | | | | | | * isofs/rr.c (rrip_work): Use gnu_dev_makedev instead of makedev. * libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Likewise. * libnetfs/file-set-translator.c (netfs_S_file_set_translator): Likeiwse. * nfs/nfs.c (xdr_decode_fattr): Likewise. * storeio/storeio.c (parse_opt): Likewise. * libfshelp/fetch-root.c (fshelp_short_circuited_callback1): Use gnu_dev_major and gnu_dev_minor instead of major and minor. * libnetfs/file-get-translator.c (netfs_S_file_get_translator): Likewise. * nfs/ops.c (netfs_attempt_link): Likewise. * storeio/storeio.c (trivfs_append_args): Likewise. * trans/fakeroot.c (netfs_attempt_mkdev): Likewise. * pfinet/glue-include/linux/mm.h: Include <mach/vm_param.h>. * term/users.c: Include <signal.h>
* pfinet: Fix array size hardcoded valueSamuel Thibault2017-09-261-1/+1
| | | | | | | as hinted by Joan Lledó * pfinet/iioctl-ops.c (get_dev): Set ifname size to IFNAMSIZ instead of hardcoded value
* pfinet: Avoid returning udp errors unless requestedSamuel Thibault2017-09-261-21/+6
| | | | | | | This comes from Linux 2.3.40 to 2.3.41 changes, to fix its behavior according to common practice. Unconnected udp sockets notably should not report errors, since the application doesn't have a way to relate it with previous sends.
* pfinet: select UDP/TCP ports randomlySamuel Thibault2017-09-106-21/+10
| | | | | | | | | | | | | | * pfinet/linux-src/include/net/tcp.h (tcp_port_rover): Remove declaration * pfinet/linux-src/include/net/udp.h (udp_port_rover): Likewise. * pfinet/linux-src/net/ipv4/tcp_ipv4.c (tcp_port_rover): Remove variable. (tcp_v4_get_port): Take port hint from net_random() instead of tcp_port_rover. * pfinet/linux-src/net/ipv4/udp.c (udp_port_rover, udp_v4_get_port): Likewise. * pfinet/linux-src/net/ipv6/tcp_ipv6.c (tcp_v6_get_port): Likewise. * pfinet/linux-src/net/ipv6/udp_ipv6.c (udp_v6_get_port): Likewise.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-0511-41/+41
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* pfinet: fix memory leakRichard Braun2016-06-141-1/+5
| | | | * pfinet/socket-ops.c (S_socket_recv): Unmap data on error.
* Unify and document the way fsids are handled in trivfs translatorsJustus Winter2016-04-281-1/+0
| | | | | | | | * doc/hurd.texi: Clarify what happens if 'trivfs_fsid' is zero. * login/utmp.c: Leave 'trivfs_fsid' at zero. * pfinet/main.c: Likewise. * trans/ifsock.c: Likewise. * trans/proxy-defpager.c: Likewise.
* Fix supporting >4GiB files in ext2fsSamuel Thibault2016-04-261-1/+0
| | | | | | | | | | * ext2fs/inode.c (diskfs_user_read_node): When sizeof(off_t) >= 8, add di->i_size_high as high-64bit part to st->st_size. Drop setting unused info->i_high_size. (write_node): When sizeof(off_t) >= 8, write high-64bit part of st->st_size to di->i_size_high. * ext2fs/ext2_fs_i.h (ext2_inode_info): Remove i_high_size field. * pfinet/linux-src/include/linux/ext2_fs_i.h (ext2_inode_info): Likewise.
* Fix gcc signedness warningsSamuel Thibault2016-01-141-1/+1
| | | | | * pfinet/linux-src/include/linux/skbuff.h (__skb_pull): Return unsigned char * instead of char *.
* Fix pfinet crashSamuel Thibault2016-01-031-0/+3
| | | | | | | | | | During rsyslog testsuite, it does happen that threads running schedule_timeout get woken up by something else than the timer. The (local) timer needs to be removed in that case. Let's just always remove it, like Linux does. * pfinet/glue-include/linux/sched.h (schedule_timeout): Remove local timer before returning.
* Make private variables staticSamuel Thibault2016-01-031-2/+2
| | | | * pfinet/timer-emul.c (timers, timer_thread): Make variables static.
* allow pfinet to link using -O0Flavio Cruz2016-01-0244-255/+238
| | | | | This fixes a long list of undefined references when compiling with -O0 by using static instead of extern in header files.
* Drop OTHERLIBS and use LDLIBS exclusivelyFlavio Cruz2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
* pfinet: fix sanity check at translator startup timeJustus Winter2015-11-031-2/+4
| | | | * pfinet/main.c (main): Properly iterate over `pfinet_protid_portclasses'.
* pfinet: convert to trivfs dynamic classes and bucketsJustus Winter2015-09-274-37/+41
| | | | | | | | | | | | | | | | | | | | libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * pfinet/main.c: Convert to dynamic classes and buckets. * pfinet/options.c: Likewise. * pfinet/pfinet.h: Likewise. * pfinet/socket-ops.c: Likewise.
* Do not keep mutex locked while waiting for authenticate loopSamuel Thibault2015-07-041-0/+3
| | | | | | | * libdiskfs/io-reauthenticate.c (diskfs_S_io_reauthenticate): Release the node lock while blocking on the auth server and client. * libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Likewise. * pfinet/io-ops.c (S_io_reauthenticate): Likewise.
* Allow dhcp trafic and configurationSamuel Thibault2015-02-022-80/+258
| | | | | | | | | | | | | | | | | | | | | | | | | 2007-10-14 Christian Dietrich <stettberger@dokucode.de> * options.c (options): Marked -a, -g -m, -p, -A, -G OPTION_ARG_OPTIONAL. (parse_interface_copy_device): New function. (parse_opt): When selecting another interface with -i set the options from e.g. a prior fsysopts call as default values. For -a, -g, -p, -g, -A, -G set the optional argument as value. When there is no argument, delete the value (e.g. unset default gateway). Delete delete default gateways only if the set gateway is on an interface modified in this call. Add always an route for dhcp packages on all devices. By doing this we can send dhcp renew packages. (trivfs_append_args): Add --gateway only once. 2007-10-14 Marco Gerards <metgerards@student.han.nl> * options.c (parse_opt): Add the route for `0.0.0.0' so broadcasting works. * linux-src/net/ipv4/devinet.c (inet_insert_ifa) [_HURD_]: Don't fail when the address is `0.0.0.0'.
* Remove unimplemented -s optionSamuel Thibault2015-02-021-1/+0
| | | | * pfinet/options.c (options): Remove 's' case.
* Backport Linux changes for proper TCP EOF handlingSamuel Thibault2015-01-033-32/+31
| | | | | | | | | | | | | Notably when remote eagerly sends a RST: we want to return EOF to the application, not EPIPE. * pfinet/linux-src/net/ipv4/tcp_output.c (tcp_connect): Set sk->done to 0. * pfinet/linux-src/net/ipv4/tcp_input.c (tcp_fin): Set RCV_SHUTDOWN, and sk->done to 1. * pfinet/linux-src/net/ipv4/tcp.c (tcp_recv_urg): Only return ENOTCONN when we never actually connect. Always return 0 when reception is closed. (tcp_recvmsg): When any data is available, ignore errors and EOF. When no data is available, first check for reception being closed, then for errors.
* Replace `bcopy' with `memcpy' or `memmove' as appropriateJustus Winter2014-12-102-6/+6
| | | | | | | | | | | | | | | | | | | * ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise.
* Replace `bzero' with `memset'Justus Winter2014-12-105-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.