Re: cwm - vtile and htile functions not compatible with group paradigm?
On Sun 2019.08.11 at 11:28 +0200, Alessandro DE LAURENZIS wrote: > Dear tech@ readers, > > I recently started to use cwm (which I'm appreciating for its simplicity) > and, coming from a long dwm experience, I use the vtile/htile functions a > lot. > > I noticed that, imho, they break the group paradigm (maybe to the advanted > of ewmh desktop usage in this case, which is partially broken in other > situations, see e.g. [1]), since they only act on windows belonging to the > same group of the active one: > > 1) open a window in group 1; only "window 1" will be visible; > 2) switch to group 2 only and open a new window; only "window 2 will be > visible; > 3) toggle group 1 visibility; both "window 1" and "window 2" are now > visible; > 4) try "vtile" or "htile" functions: nothing happens, since there is only > one client for each group. > > In a situation like that, I'm expecting tile-shaping adjustment instead... > > Would the following patch be suitable? BTW, your tree is considerably out-of-date. Either way, it's the same issue/response that you refered to [1], but it breaks that behaviour instead. Groups and ewmh workspaces are incompatible, and cwm is not a tiling window manager; yes, the traditional cwm "groups" can to go away, or ewmh desktops need to add yet another layer. However if cwm groups change that much, it's no longer cwm and eventually everyone coming from dwm will want to re-create dwm in cwm (some of that already happened - imho a mistake (even parts of ewmh break cwm's traditional behavior that some people prefer (focus/warping issues))). There is nothing wrong with using dwm if that's the desired behaviour. > > --- client.c.orig Sun Aug 11 10:47:28 2019 > > +++ client.cSun Aug 11 10:50:20 2019 > > @@ -974,7 +974,7 @@ > > return; > > i = n = 0; > > - TAILQ_FOREACH(ci, >clientq, group_entry) { > > + TAILQ_FOREACH(ci, >clientq, entry) { > > if (ci->flags & CLIENT_HIDDEN || > > ci->flags & CLIENT_IGNORE || (ci == cc)) > > continue; > > @@ -1003,7 +1003,7 @@ > > x = area.x; > > w = area.w / n; > > h = area.h - mh; > > - TAILQ_FOREACH(ci, >clientq, group_entry) { > > + TAILQ_FOREACH(ci, >clientq, entry) { > > if (ci->flags & CLIENT_HIDDEN || > > ci->flags & CLIENT_IGNORE || (ci == cc)) > > continue; > > @@ -1034,7 +1034,7 @@ > > return; > > i = n = 0; > > - TAILQ_FOREACH(ci, >clientq, group_entry) { > > + TAILQ_FOREACH(ci, >clientq, entry) { > > if (ci->flags & CLIENT_HIDDEN || > > ci->flags & CLIENT_IGNORE || (ci == cc)) > > continue; > > @@ -1063,7 +1063,7 @@ > > y = area.y; > > h = area.h / n; > > w = area.w - mw; > > - TAILQ_FOREACH(ci, >clientq, group_entry) { > > + TAILQ_FOREACH(ci, >clientq, entry) { > > if (ci->flags & CLIENT_HIDDEN || > > ci->flags & CLIENT_IGNORE || (ci == cc)) > > continue; > > > [1] https://marc.info/?l=openbsd-misc=148094411610762=2 > > -- > Alessandro DE LAURENZIS > [mailto:jus...@atlantide.t28.net] > Web: http://www.atlantide.t28.net > LinkedIn: https://www.linkedin.com/in/delaurenzis/ >
assorted improvements to less.1, more.1
- less(1) should explain what it does before it talks about more(1) - reference the COMMANDS section directly when mentioning commands - add HISTORY to less.1 - credit Garret D'Amore in AUTHORS since he is also attributed in the source code as a copyright holder - it is false that more(1) can be invoked with the options of less(1) Regards, Evan Silberman P.S. patch generated with got(1), neat. diff 3474c532363343e2e65328f8389848966744ce51 99ab9c189b3b40d7b96cd17ef241b444a0bf456a blob - 8e6971c243372003b031bba7e37bc50ff3ab8030 blob + 44d9b5001fa119c53e0cf27f9e103d23f5e48dc2 --- usr.bin/less/less.1 +++ usr.bin/less/less.1 @@ -48,30 +48,22 @@ .Op Ar .Sh DESCRIPTION .Nm -is a program similar to the traditional -.Xr more 1 , -but with many more features. -It displays text one screenful at a time. -After showing each screenful, it prompts the user for a command. +displays text one screenful at a time. +After showing each screenful, it prompts the user for a command, +as described in +.Sx COMMANDS . When showing the last line of a file, .Nm displays a prompt indicating end of file and the name of the next file to examine, if any. It then waits for input from the user. .Pp -Commands are based on both traditional -.Xr more 1 -and -.Xr vi 1 . -Commands may be preceded by a decimal number, -called -.Ar N -in the descriptions below. -The number is used by some commands, as indicated. -.Pp -This version of .Nm -also acts as +is similar to the traditional +.Xr more 1 , +but with many more features. +.Nm +will behave like .Xr more 1 if it is called as .Nm more , @@ -757,6 +749,14 @@ command described previously may also be used to set (or change) an initial command for every file. .El .Sh COMMANDS +Commands are based on both traditional +.Xr more 1 +and +.Xr vi 1 . +Commands may be preceded by a decimal number, +called +.Ar N +in the descriptions below. In the following descriptions, ^X means control-X. ESC stands for the ESCAPE key; for example ESC-v means the two character sequence "ESCAPE", then "v". @@ -1916,5 +1916,16 @@ is used. .Sh SEE ALSO .Xr lesskey 1 , .Xr more 1 +.Sh HISTORY +Mark Nudelman created +.Nm +beginning in 1983; it was first published in 1985. +.Nm +was included in +.Ox 2.0 . +The present implementation is based on a fork by Garret D'Amore and +first appeared in +.Ox 5.9 . .Sh AUTHORS -.An Mark Nudelman . +.An Mark Nudelman Aq Mt ma...@greenwoodsoftware.com +.An Garret D'Amore blob - 66b4ee23971952e3f9297adf54dc1a5f0276f81b blob + e4eba49ed8b04c2a68ae66190cc1273fce350f3d --- usr.bin/less/more.1 +++ usr.bin/less/more.1 @@ -65,17 +65,6 @@ It then waits for input from the user. Scrolling forward switches to the next file, or exits if there is none. .Pp -This version of -.Nm -is actually -.Xr less 1 -in disguise. -As such, it will also accept options documented in -.Xr less 1 . -This manual page describes only features -relevant to a POSIX compliant -.Nm . -.Pp The options are as follows: .Bl -tag -width Ds .It Fl c @@ -318,5 +307,9 @@ A .Nm command appeared in .Bx 3.0 . +The present implementation is actually +.Xr less 1 +in disguise. .Sh AUTHORS .An Mark Nudelman Aq Mt ma...@greenwoodsoftware.com +.An Garret D'Amore
Re: minor INSTALL.loongson tweaks
Is suspend-resume not working on the lemote anymore?
Re: pms: add extra ic type for elantech ps/2 touchpads
A little more information after looking around a bit. The linux [1] and freebsd [2] drivers accept all elantech touchpads with ic types from 6 up to 15 as using the v4 protocol. The following patch extends the accepted ic types to that range (from the current set consisting of 6, 8, and 15). I cannot, however, test touchpads with ic types other than 13. 1. https://github.com/torvalds/linux/commit/10d900303f1c3a821eb0bef4e7b7ece16768fba4#diff-e91bc4802c6797fe9acbdca0ed240be9 2. https://github.com/freebsd/freebsd/commit/8b5fc46c359e276d4545b531a3d3eb15762d1783#diff-fac99891d1c5da0f566dbcc68ba62b22 Index: pms.c === RCS file: /cvs/src/sys/dev/pckbc/pms.c,v retrieving revision 1.88 diff -u -p -r1.88 pms.c --- pms.c 26 Jan 2019 11:57:21 - 1.88 +++ pms.c 11 Aug 2019 16:36:30 - @@ -1945,9 +1945,7 @@ elantech_get_hwinfo_v4(struct pms_softc if (synaptics_query(sc, ELANTECH_QUE_FW_VER, _version)) return (-1); - if ((fw_version & 0x0f) >> 16 != 6 - && (fw_version & 0x0f) >> 16 != 8 - && (fw_version & 0x0f) >> 16 != 15) + if ((fw_version & 0x0f) >> 16 < 6) return (-1); elantech->fw_version = fw_version;
fix inet6 displaying in smtpd
hello, smtpd improperly displays inet6 addresses as reported by semarie@: address=smtps://IPv6:2a01:e0c:1::25:465 fact is, helo response and Received headers display inet6 addresses as IPv6:2a01:e0c:1::25 which initially led me to use this format in smtpd instead of the proper one which is [2a01:e0c:1::25] this diff ensures the proper format is used internally while having a specialized ss_to_helo_text() function in smtp_session to use the alternate format in the two places that actually need it. special care taken in envelope.c to temporarily accept both formats in disk envelopes for the transition phase. diff tested and ok semarie@ who suggested I show it to a broader audience. Index: envelope.c === RCS file: /cvs/src/usr.sbin/smtpd/envelope.c,v retrieving revision 1.43 diff -u -p -r1.43 envelope.c --- envelope.c 3 Jul 2019 03:24:03 - 1.43 +++ envelope.c 11 Aug 2019 12:57:33 - @@ -297,7 +297,16 @@ ascii_load_sockaddr(struct sockaddr_stor ss->ss_family = AF_LOCAL; } else if (strncasecmp("IPv6:", buf, 5) == 0) { + /* XXX - remove this after 6.6 release */ if (inet_pton(AF_INET6, buf + 5, _addr) != 1) + return 0; + ssin6.sin6_family = AF_INET6; + memcpy(ss, , sizeof(ssin6)); + ss->ss_len = sizeof(struct sockaddr_in6); + } + else if (buf[0] == '[' && buf[strlen(buf)-1] == ']') { + buf[strlen(buf)-1] = '\0'; + if (inet_pton(AF_INET6, buf+1, _addr) != 1) return 0; ssin6.sin6_family = AF_INET6; memcpy(ss, , sizeof(ssin6)); Index: smtp_session.c === RCS file: /cvs/src/usr.sbin/smtpd/smtp_session.c,v retrieving revision 1.404 diff -u -p -r1.404 smtp_session.c --- smtp_session.c 10 Aug 2019 16:07:01 - 1.404 +++ smtp_session.c 11 Aug 2019 12:57:34 - @@ -283,6 +283,22 @@ static struct tree wait_ssl_verify; static struct tree wait_filters; static struct tree wait_filter_fd; +static const char * +ss_to_helo_text(const struct sockaddr_storage *ss) +{ + static char buf[NI_MAXHOST + 5]; + static char helobuf[NI_MAXHOST + 5]; + + (void)strlcpy(buf, ss_to_text(ss), sizeof buf); + + if (buf[0] != '[') + return buf; + buf[strlen(buf)-1] = '\0'; + + (void)snprintf(helobuf, sizeof helobuf, "IPv6:%s", buf+1); + return helobuf; +} + static void header_append_domain_buffer(char *buffer, char *domain, size_t len) { @@ -1739,7 +1755,7 @@ smtp_proceed_helo(struct smtp_session *s smtp_reply(s, "250 %s Hello %s [%s], pleased to meet you", s->smtpname, s->helo, - ss_to_text(>ss)); + ss_to_helo_text(>ss)); } static void @@ -1756,7 +1772,7 @@ smtp_proceed_ehlo(struct smtp_session *s smtp_reply(s, "250-%s Hello %s [%s], pleased to meet you", s->smtpname, s->helo, - ss_to_text(>ss)); + ss_to_helo_text(>ss)); smtp_reply(s, "250-8BITMIME"); smtp_reply(s, "250-ENHANCEDSTATUSCODES"); @@ -2805,7 +2821,7 @@ smtp_message_begin(struct smtp_tx *tx) m_printf(tx, "from %s (%s [%s])", s->helo, s->rdns, - ss_to_text(>ss)); + ss_to_helo_text(>ss)); } m_printf(tx, "\n\tby %s (%s) with %sSMTP%s%s id %08x", s->smtpname, Index: to.c === RCS file: /cvs/src/usr.sbin/smtpd/to.c,v retrieving revision 1.38 diff -u -p -r1.38 to.c --- to.c11 Aug 2019 10:54:44 - 1.38 +++ to.c11 Aug 2019 12:57:34 - @@ -169,10 +169,9 @@ sa_to_text(const struct sockaddr *sa) const struct in6_addr *in6_addr; in6 = (const struct sockaddr_in6 *)sa; - (void)strlcpy(buf, "IPv6:", sizeof(buf)); - p = buf + 5; + p = buf; in6_addr = >sin6_addr; - (void)bsnprintf(p, NI_MAXHOST, "%s", in6addr_to_text(in6_addr)); + (void)bsnprintf(p, NI_MAXHOST, "[%s]", in6addr_to_text(in6_addr)); } return (buf); -- Gilles Chehade @poolpOrg https://www.poolp.orgpatreon: https://www.patreon.com/gilles
Re: install.sub: Typofixes in comments
Fair enough (not a native speaker, so good to know :) ). Regards. Pabll On Sun, Aug 11, 2019, 15:31 Klemens Nanni wrote: > On Sun, Aug 11, 2019 at 01:51:25PM +0200, Pablo Méndez Hernández wrote: > > > @@ -1506,9 +1506,9 @@ install_files() { > > > # Fetch sets from local sources (disk, cdrom, nfs) as root. > > > [[ $_src == file://* ]] && _srclocal=true _unpriv= > > > > > > - # Based on the file list in $_files, create two list for > > > select_sets(). > > > + # Based on the file list in $_files, create two lists for > > > select_sets(). > > > # _sets: the list of files the user can select from > > > - # _get_sets: the list of files that are shown as pre-selectd > > > + # _get_sets: the list of files that are shown as pre-selected > > > > > > > Maybe add an ending-sentence period there? > Contrary to the other comments, these are no valid sentences as the verb > is missing, so a period would seem misplaced here. >
Re: install.sub: Typofixes in comments
On Sun, Aug 11, 2019 at 01:51:25PM +0200, Pablo Méndez Hernández wrote: > > @@ -1506,9 +1506,9 @@ install_files() { > > # Fetch sets from local sources (disk, cdrom, nfs) as root. > > [[ $_src == file://* ]] && _srclocal=true _unpriv= > > > > - # Based on the file list in $_files, create two list for > > select_sets(). > > + # Based on the file list in $_files, create two lists for > > select_sets(). > > # _sets: the list of files the user can select from > > - # _get_sets: the list of files that are shown as pre-selectd > > + # _get_sets: the list of files that are shown as pre-selected > > > > Maybe add an ending-sentence period there? Contrary to the other comments, these are no valid sentences as the verb is missing, so a period would seem misplaced here.
Re: install.sub: Typofixes in comments
On 2019/08/11 13:23, Klemens Nanni wrote: > OK? > > Index: install.sub > === > RCS file: /cvs/src/distrib/miniroot/install.sub,v > retrieving revision 1.1136 > diff -u -p -r1.1136 install.sub > --- install.sub 6 Aug 2019 10:07:45 - 1.1136 > +++ install.sub 11 Aug 2019 11:20:02 - > @@ -1506,9 +1506,9 @@ install_files() { > # Fetch sets from local sources (disk, cdrom, nfs) as root. > [[ $_src == file://* ]] && _srclocal=true _unpriv= > > - # Based on the file list in $_files, create two list for select_sets(). > + # Based on the file list in $_files, create two lists for select_sets(). > # _sets: the list of files the user can select from > - # _get_sets: the list of files that are shown as pre-selectd > + # _get_sets: the list of files that are shown as pre-selected > # > # Sets will be installed in the order given in ALLSETS to ensure proper > # installation. So, to minimize user confusion display the sets in the ok > @@ -1592,7 +1592,7 @@ install_files() { > ! $_unpriv ftp -D "$_t" -Vmo - "$_src/SHA256.sig" > >"$_cfile.sig" && > _issue="Cannot fetch SHA256.sig" && break > > - # The bsd.rd only download/verify/install assumes that the sets > + # The bsd.rd only download/verify/install assumes the sets > # location of the next release. So use the right signature file. > $UPGRADE_BSDRD && > PUB_KEY=/mnt/etc/signify/openbsd-$((VERSION + > 1))-base.pub > this took me a few attempts to parse. s/bsd.rd only/bsd.rd-only/ maybe?
Re: ospfd: warn when a neighbor changes its ip address
Remi Locherer(remi.loche...@relo.ch) on 2019.08.11 11:37:27 +0200: > I'd like to get a notification when a neighbor changes the src IP address > for hello packets. Either it is a planned change or something bad happens > in the network. > > OK? ok > > Remi > > > Index: hello.c > === > RCS file: /cvs/src/usr.sbin/ospfd/hello.c,v > retrieving revision 1.23 > diff -u -p -r1.23 hello.c > --- hello.c 15 Jul 2019 18:26:39 - 1.23 > +++ hello.c 11 Aug 2019 09:36:13 - > @@ -189,10 +189,16 @@ recv_hello(struct iface *iface, struct i > nbr->dr.s_addr = hello.d_rtr; > nbr->bdr.s_addr = hello.bd_rtr; > nbr->priority = hello.rtr_priority; > + /* XXX neighbor address shouldn't be stored on virtual links */ > + nbr->addr.s_addr = src.s_addr; > + } > + > + if (nbr->addr.s_addr != src.s_addr) { > + log_warnx("%s: neighbor ID %s changed its IP address", > + __func__, inet_ntoa(nbr->id)); > + nbr->addr.s_addr = src.s_addr; > } > > - /* actually the neighbor address shouldn't be stored on virtual links */ > - nbr->addr.s_addr = src.s_addr; > nbr->options = hello.opts; > > nbr_fsm(nbr, NBR_EVT_HELLO_RCVD); >
Re: ospfd: check dst addr for hello packets
reads ok Remi Locherer(remi.loche...@relo.ch) on 2019.08.11 11:21:36 +0200: > When ospfd receives a hello packet it takes the src IP address and updates > the address in its neighbor struct for the given router id unconditionally. > > In the case of broadcast interfaces this is not a problem: > find_iface() checks that the src address is from the same subnet as > the receiving interface is. It is best practice to only enable ospf in a > subnet where you control all routers. > > But in the case of point-to-point interfaces no sanity checks happen on the > src or dst IP address. > > RFC 2328 says in "9.5. Sending Hello packets": > On broadcast networks and physical point-to-point networks, > Hello packets are sent every HelloInterval seconds to the IP > multicast address AllSPFRouters. > > > I verified that ospfd does it like that. Also FastIron and Junos follow > this. > > I propose that we add a check and only accept hellos on point-to-point and > broadcast interfaces when the destination is 224.0.0.5 (AllSPFRouters). > > The check for AllDRouters is not needed in addition to the proposed check. > > OK? > > Remi > > > Index: packet.c > === > RCS file: /cvs/src/usr.sbin/ospfd/packet.c,v > retrieving revision 1.32 > diff -u -p -r1.32 packet.c > --- packet.c 15 Jul 2019 18:26:39 - 1.32 > +++ packet.c 11 Aug 2019 09:17:51 - > @@ -219,12 +219,16 @@ recv_packet(int fd, short event, void *b > /* switch OSPF packet type */ > switch (ospf_hdr->type) { > case PACKET_TYPE_HELLO: > - inet_aton(AllDRouters, ); > - if (ip_hdr.ip_dst.s_addr == addr.s_addr) { > - log_debug("recv_packet: invalid destination IP " > - "address"); > - break; > - } > + inet_aton(AllSPFRouters, ); > + if (iface->type == IF_TYPE_BROADCAST || > + iface->type == IF_TYPE_POINTOPOINT) > + if (ip_hdr.ip_dst.s_addr != addr.s_addr) { > + log_warnx("%s: hello ignored on interface %s, " > + "invalid destination IP address %s", > + __func__, iface->name, > + inet_ntoa(ip_hdr.ip_dst)); > + break; > + } > > recv_hello(iface, ip_hdr.ip_src, ospf_hdr->rtr_id, buf, len); > break; >
Re: install.sub: Typofixes in comments
Hi Klemens: Minimal suggestion inline: On Sun, Aug 11, 2019, 13:27 Klemens Nanni wrote: > OK? > > Index: install.sub > === > RCS file: /cvs/src/distrib/miniroot/install.sub,v > retrieving revision 1.1136 > diff -u -p -r1.1136 install.sub > --- install.sub 6 Aug 2019 10:07:45 - 1.1136 > +++ install.sub 11 Aug 2019 11:20:02 - > @@ -1506,9 +1506,9 @@ install_files() { > # Fetch sets from local sources (disk, cdrom, nfs) as root. > [[ $_src == file://* ]] && _srclocal=true _unpriv= > > - # Based on the file list in $_files, create two list for > select_sets(). > + # Based on the file list in $_files, create two lists for > select_sets(). > # _sets: the list of files the user can select from > - # _get_sets: the list of files that are shown as pre-selectd > + # _get_sets: the list of files that are shown as pre-selected > Maybe add an ending-sentence period there? # > # Sets will be installed in the order given in ALLSETS to ensure > proper > # installation. So, to minimize user confusion display the sets > in the > @@ -1592,7 +1592,7 @@ install_files() { > ! $_unpriv ftp -D "$_t" -Vmo - "$_src/SHA256.sig" > >"$_cfile.sig" && > _issue="Cannot fetch SHA256.sig" && break > > - # The bsd.rd only download/verify/install assumes that the > sets > + # The bsd.rd only download/verify/install assumes the sets > # location of the next release. So use the right signature > file. > $UPGRADE_BSDRD && > PUB_KEY=/mnt/etc/signify/openbsd-$((VERSION + > 1))-base.pub > >
sysctl.2 update
document ip.arpq and remove ip, ip6 and mpls ifq. Index: sysctl.2 === RCS file: /cvs/src/lib/libc/sys/sysctl.2,v retrieving revision 1.27 diff -u -p -r1.27 sysctl.2 --- sysctl.29 May 2019 15:05:47 - 1.27 +++ sysctl.211 Aug 2019 11:42:35 - @@ -1240,12 +1240,13 @@ The currently defined protocols and name .It icmp Ta redirtimeout Ta integer Ta yes .It icmp Ta stats Ta structure Ta no .It icmp Ta tstamprepl Ta integer Ta yes +.It ip Ta arpqueued Ta integer Ta no .It ip Ta arpdown Ta integer Ta yes .It ip Ta arptimeout Ta integer Ta yes +.It ip Ta arpq Ta node Ta "N/A" .It ip Ta directed-broadcast Ta integer Ta yes .It ip Ta encdebug Ta integer Ta yes .It ip Ta forwarding Ta integer Ta yes -.It ip Ta ifq Ta node Ta "N/A" .It ip Ta ipsec-allocs Ta integer Ta yes .It ip Ta ipsec-auth-alg Ta string Ta yes .It ip Ta ipsec-bytes Ta integer Ta yes @@ -1402,28 +1403,17 @@ Returns the ICMP statistics in a struct .It Li icmp.tstamprepl Pq Va net.inet.icmp.tstamprepl If set to 1, reply to ICMP timestamp requests. If set to 0, ignore timestamp requests. +.It Li ip.arpqueued Pq Va net.inet.ip.arpqueued +Number of packets ARP resolution is holding onto until it gets a MAC +address for an IP. .It Li ip.arpdown Pq Va net.inet.ip.arpdown Lifetime of unresolved ARP entries, in seconds. .It Li ip.arptimeout Pq Va net.inet.ip.arptimeout Lifetime of resolved ARP entries, in seconds. -.It Li ip.directed-broadcast Pq Va net.inet.ip.directed-broadcast -Returns 1 if directed broadcast behavior is enabled for the host. -.It Li ip.encdebug Pq Va net.inet.ip.encdebug -Returns 1 when error message reporting is enabled for the host. -If the kernel has been compiled with the -.Dv ENCDEBUG -option, -then debugging information will also be reported when this variable is set. -.It Li ip.forwarding Pq Va net.inet.ip.forwarding -If set to 1, then IP forwarding is enabled for the host, -indicating the host is acting as a router. -If set to 2, then IP forwarding is restricted to traffic that has been -IPsec encapsulated or decapsulated by the host. -The default value is 0. -.It Li ip.ifq +.It Li ip.arpq Fifth level comprises an array of .Vt struct ifqueue -structures containing information about IP packet input queue. +structures containing information about ARP queue. The fifth level names for the elements of .Vt struct ifqueue are detailed below. @@ -1437,13 +1427,27 @@ are detailed below. The variables are as follows: .Pp .Bl -tag -width Ds -compact -.It Dv IFQCTL_DROPS Pq Va net.inet.ip.ifq.drops +.It Dv IFQCTL_DROPS Pq Va net.inet.ip.arpq.drops Returns number of packet dropped. -.It Dv IFQCTL_LEN Pq Va net.inet.ip.ifq.len +.It Dv IFQCTL_LEN Pq Va net.inet.ip.arpq.len Returns the current queue length. -.It Dv IFQCTL_MAXLEN Pq Va net.inet.ip.ifq.maxlen +.It Dv IFQCTL_MAXLEN Pq Va net.inet.ip.arpq.maxlen Get or set the maximum number of queue length. .El +.It Li ip.directed-broadcast Pq Va net.inet.ip.directed-broadcast +Returns 1 if directed broadcast behavior is enabled for the host. +.It Li ip.encdebug Pq Va net.inet.ip.encdebug +Returns 1 when error message reporting is enabled for the host. +If the kernel has been compiled with the +.Dv ENCDEBUG +option, +then debugging information will also be reported when this variable is set. +.It Li ip.forwarding Pq Va net.inet.ip.forwarding +If set to 1, then IP forwarding is enabled for the host, +indicating the host is acting as a router. +If set to 2, then IP forwarding is restricted to traffic that has been +IPsec encapsulated or decapsulated by the host. +The default value is 0. .It Li ip.ipsec-allocs Pq Va net.inet.ip.ipsec-allocs The number of IPsec flows that can use a security association before it expires. @@ -1753,7 +1757,6 @@ The currently defined protocols and name .It ip6 Ta forwarding Ta integer Ta yes .It ip6 Ta hdrnestlimit Ta integer Ta yes .It ip6 Ta hlim Ta integer Ta yes -.It ip6 Ta ifq Ta node Ta "N/A" .It ip6 Ta log_interval Ta integer Ta yes .It ip6 Ta maxdynroutes Ta integer Ta yes .It ip6 Ta maxfragpackets Ta integer Ta yes @@ -1881,15 +1884,6 @@ This value applies to all the transport Methods for overriding this value are documented in .Xr ip6 4 . .Pp -.It Li ip6.ifq Pq Va net.inet6.ip6.ifq -Fifth level comprises an array of -.Vt struct ifqueue -structures containing information about IPv6 packet input queue. -The fifth level names for the elements of -.Vt struct ifqueue -are detailed above in -.Li ip.ifq . -.Pp .It Li ip6.log_interval Pq Va net.inet6.ip6.log_interval This variable permits adjusting the amount of logs generated by the IPv6 packet forwarding engine. @@ -1979,7 +1973,6 @@ Get or set global information about MPLS .Bl -column "MPLSCTL_MAXINKLOOP " "integer" "not applicable" -offset indent .It Sy "Third level name" Ta Sy "Type" Ta Sy "Changeable" .It Dv MPLSCTL_DEFTTL Ta integer Ta yes -.It Dv MPLSCTL_IFQUEUE Ta node Ta "not
install.sub: Typofixes in comments
OK? Index: install.sub === RCS file: /cvs/src/distrib/miniroot/install.sub,v retrieving revision 1.1136 diff -u -p -r1.1136 install.sub --- install.sub 6 Aug 2019 10:07:45 - 1.1136 +++ install.sub 11 Aug 2019 11:20:02 - @@ -1506,9 +1506,9 @@ install_files() { # Fetch sets from local sources (disk, cdrom, nfs) as root. [[ $_src == file://* ]] && _srclocal=true _unpriv= - # Based on the file list in $_files, create two list for select_sets(). + # Based on the file list in $_files, create two lists for select_sets(). # _sets: the list of files the user can select from - # _get_sets: the list of files that are shown as pre-selectd + # _get_sets: the list of files that are shown as pre-selected # # Sets will be installed in the order given in ALLSETS to ensure proper # installation. So, to minimize user confusion display the sets in the @@ -1592,7 +1592,7 @@ install_files() { ! $_unpriv ftp -D "$_t" -Vmo - "$_src/SHA256.sig" >"$_cfile.sig" && _issue="Cannot fetch SHA256.sig" && break - # The bsd.rd only download/verify/install assumes that the sets + # The bsd.rd only download/verify/install assumes the sets # location of the next release. So use the right signature file. $UPGRADE_BSDRD && PUB_KEY=/mnt/etc/signify/openbsd-$((VERSION + 1))-base.pub
cwm - vtile and htile functions not compatible with group paradigm?
Dear tech@ readers, I recently started to use cwm (which I'm appreciating for its simplicity) and, coming from a long dwm experience, I use the vtile/htile functions a lot. I noticed that, imho, they break the group paradigm (maybe to the advanted of ewmh desktop usage in this case, which is partially broken in other situations, see e.g. [1]), since they only act on windows belonging to the same group of the active one: 1) open a window in group 1; only "window 1" will be visible; 2) switch to group 2 only and open a new window; only "window 2 will be visible; 3) toggle group 1 visibility; both "window 1" and "window 2" are now visible; 4) try "vtile" or "htile" functions: nothing happens, since there is only one client for each group. In a situation like that, I'm expecting tile-shaping adjustment instead... Would the following patch be suitable? --- client.c.orig Sun Aug 11 10:47:28 2019 +++ client.cSun Aug 11 10:50:20 2019 @@ -974,7 +974,7 @@ return; i = n = 0; - TAILQ_FOREACH(ci, >clientq, group_entry) { + TAILQ_FOREACH(ci, >clientq, entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -1003,7 +1003,7 @@ x = area.x; w = area.w / n; h = area.h - mh; - TAILQ_FOREACH(ci, >clientq, group_entry) { + TAILQ_FOREACH(ci, >clientq, entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -1034,7 +1034,7 @@ return; i = n = 0; - TAILQ_FOREACH(ci, >clientq, group_entry) { + TAILQ_FOREACH(ci, >clientq, entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; @@ -1063,7 +1063,7 @@ y = area.y; h = area.h / n; w = area.w - mw; - TAILQ_FOREACH(ci, >clientq, group_entry) { + TAILQ_FOREACH(ci, >clientq, entry) { if (ci->flags & CLIENT_HIDDEN || ci->flags & CLIENT_IGNORE || (ci == cc)) continue; [1] https://marc.info/?l=openbsd-misc=148094411610762=2 -- Alessandro DE LAURENZIS [mailto:jus...@atlantide.t28.net] Web: http://www.atlantide.t28.net LinkedIn: https://www.linkedin.com/in/delaurenzis/
ospfd: warn when a neighbor changes its ip address
I'd like to get a notification when a neighbor changes the src IP address for hello packets. Either it is a planned change or something bad happens in the network. OK? Remi Index: hello.c === RCS file: /cvs/src/usr.sbin/ospfd/hello.c,v retrieving revision 1.23 diff -u -p -r1.23 hello.c --- hello.c 15 Jul 2019 18:26:39 - 1.23 +++ hello.c 11 Aug 2019 09:36:13 - @@ -189,10 +189,16 @@ recv_hello(struct iface *iface, struct i nbr->dr.s_addr = hello.d_rtr; nbr->bdr.s_addr = hello.bd_rtr; nbr->priority = hello.rtr_priority; + /* XXX neighbor address shouldn't be stored on virtual links */ + nbr->addr.s_addr = src.s_addr; + } + + if (nbr->addr.s_addr != src.s_addr) { + log_warnx("%s: neighbor ID %s changed its IP address", + __func__, inet_ntoa(nbr->id)); + nbr->addr.s_addr = src.s_addr; } - /* actually the neighbor address shouldn't be stored on virtual links */ - nbr->addr.s_addr = src.s_addr; nbr->options = hello.opts; nbr_fsm(nbr, NBR_EVT_HELLO_RCVD);
ospfd: check dst addr for hello packets
When ospfd receives a hello packet it takes the src IP address and updates the address in its neighbor struct for the given router id unconditionally. In the case of broadcast interfaces this is not a problem: find_iface() checks that the src address is from the same subnet as the receiving interface is. It is best practice to only enable ospf in a subnet where you control all routers. But in the case of point-to-point interfaces no sanity checks happen on the src or dst IP address. RFC 2328 says in "9.5. Sending Hello packets": On broadcast networks and physical point-to-point networks, Hello packets are sent every HelloInterval seconds to the IP multicast address AllSPFRouters. I verified that ospfd does it like that. Also FastIron and Junos follow this. I propose that we add a check and only accept hellos on point-to-point and broadcast interfaces when the destination is 224.0.0.5 (AllSPFRouters). The check for AllDRouters is not needed in addition to the proposed check. OK? Remi Index: packet.c === RCS file: /cvs/src/usr.sbin/ospfd/packet.c,v retrieving revision 1.32 diff -u -p -r1.32 packet.c --- packet.c15 Jul 2019 18:26:39 - 1.32 +++ packet.c11 Aug 2019 09:17:51 - @@ -219,12 +219,16 @@ recv_packet(int fd, short event, void *b /* switch OSPF packet type */ switch (ospf_hdr->type) { case PACKET_TYPE_HELLO: - inet_aton(AllDRouters, ); - if (ip_hdr.ip_dst.s_addr == addr.s_addr) { - log_debug("recv_packet: invalid destination IP " -"address"); - break; - } + inet_aton(AllSPFRouters, ); + if (iface->type == IF_TYPE_BROADCAST || + iface->type == IF_TYPE_POINTOPOINT) + if (ip_hdr.ip_dst.s_addr != addr.s_addr) { + log_warnx("%s: hello ignored on interface %s, " + "invalid destination IP address %s", + __func__, iface->name, + inet_ntoa(ip_hdr.ip_dst)); + break; + } recv_hello(iface, ip_hdr.ip_src, ospf_hdr->rtr_id, buf, len); break;
Re: arm64 glass console
On Sat, Aug 10, 2019 at 12:16:14AM +0200, Mark Kettenis wrote: > The diff below makes it possible to switch over to the framebuffer > console in the bootloader. Currently, we'll use whatever device is > designated in the device tree (or the ACPI SPCR table) as the console. > With this diff you can use: > > boot> set tty fb0 > > to override that default. > > ok? Hi, This works great on my PineBook 11" HD -- Matthieu Herrb