forbid config reloads in ospf6d

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

forbid config reloads in ospf6d

Jeremie Courreges-Anglas-2

ospf6d consistently fails when I ask it to reload its config, even
though I have a very basic test setup:

area 0.0.0.0 {
        interface em0 { passive }
        interface vether0
}

Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
seem to be a sufficient incentive, so I propose to disable reloading
until it is fixed.

Just a suggestion, objections (and oks) welcome.


Index: ospf6ctl/ospf6ctl.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v
retrieving revision 1.46
diff -u -p -r1.46 ospf6ctl.c
--- ospf6ctl/ospf6ctl.c 12 Aug 2017 22:09:54 -0000 1.46
+++ ospf6ctl/ospf6ctl.c 5 Nov 2017 14:37:40 -0000
@@ -232,10 +232,14 @@ main(int argc, char *argv[])
  done = 1;
  break;
  case RELOAD:
+#ifdef notyet
  imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
  printf("reload request sent.\n");
  done = 1;
  break;
+#else
+ errx(1, "reload not supported");
+#endif
  }
 
  while (ibuf->w.queued)
Index: ospf6d/ospf6d.c
===================================================================
RCS file: /d/cvs/src/usr.sbin/ospf6d/ospf6d.c,v
retrieving revision 1.34
diff -u -p -r1.34 ospf6d.c
--- ospf6d/ospf6d.c 12 Aug 2017 16:27:50 -0000 1.34
+++ ospf6d/ospf6d.c 5 Nov 2017 14:36:08 -0000
@@ -561,6 +561,7 @@ ospf_redistribute(struct kroute *kr, u_i
 int
 ospf_reload(void)
 {
+#ifdef notyet
  struct area *area;
  struct ospfd_conf *xconf;
 
@@ -586,6 +587,9 @@ ospf_reload(void)
  /* update redistribute lists */
  kr_reload();
  return (0);
+#else
+ return (-1);
+#endif
 }
 
 int


--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: forbid config reloads in ospf6d

phessler
OK


On 2017 Nov 05 (Sun) at 15:50:42 +0100 (+0100), Jeremie Courreges-Anglas wrote:
:
:ospf6d consistently fails when I ask it to reload its config, even
:though I have a very basic test setup:
:
:area 0.0.0.0 {
:        interface em0 { passive }
:        interface vether0
:}
:
:Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
:seem to be a sufficient incentive, so I propose to disable reloading
:until it is fixed.
:
:Just a suggestion, objections (and oks) welcome.
:
:
:Index: ospf6ctl/ospf6ctl.c
:===================================================================
:RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v
:retrieving revision 1.46
:diff -u -p -r1.46 ospf6ctl.c
:--- ospf6ctl/ospf6ctl.c 12 Aug 2017 22:09:54 -0000 1.46
:+++ ospf6ctl/ospf6ctl.c 5 Nov 2017 14:37:40 -0000
:@@ -232,10 +232,14 @@ main(int argc, char *argv[])
: done = 1;
: break;
: case RELOAD:
:+#ifdef notyet
: imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
: printf("reload request sent.\n");
: done = 1;
: break;
:+#else
:+ errx(1, "reload not supported");
:+#endif
: }
:
: while (ibuf->w.queued)
:Index: ospf6d/ospf6d.c
:===================================================================
:RCS file: /d/cvs/src/usr.sbin/ospf6d/ospf6d.c,v
:retrieving revision 1.34
:diff -u -p -r1.34 ospf6d.c
:--- ospf6d/ospf6d.c 12 Aug 2017 16:27:50 -0000 1.34
:+++ ospf6d/ospf6d.c 5 Nov 2017 14:36:08 -0000
:@@ -561,6 +561,7 @@ ospf_redistribute(struct kroute *kr, u_i
: int
: ospf_reload(void)
: {
:+#ifdef notyet
: struct area *area;
: struct ospfd_conf *xconf;
:
:@@ -586,6 +587,9 @@ ospf_reload(void)
: /* update redistribute lists */
: kr_reload();
: return (0);
:+#else
:+ return (-1);
:+#endif
: }
:
: int
:
:
:--
:jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
:

--
APL is a write-only language.  I can write programs in APL, but I
can't read any of them.
                -- Roy Keir

Reply | Threaded
Open this post in threaded view
|

Re: forbid config reloads in ospf6d

Denis Fondras-3
In reply to this post by Jeremie Courreges-Anglas-2
Ok (for what it's worth).

On Sun, Nov 05, 2017 at 03:50:42PM +0100, Jeremie Courreges-Anglas wrote:

>
> ospf6d consistently fails when I ask it to reload its config, even
> though I have a very basic test setup:
>
> area 0.0.0.0 {
>         interface em0 { passive }
>         interface vether0
> }
>
> Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
> seem to be a sufficient incentive, so I propose to disable reloading
> until it is fixed.
>
> Just a suggestion, objections (and oks) welcome.
>
>
> Index: ospf6ctl/ospf6ctl.c
> ===================================================================
> RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v
> retrieving revision 1.46
> diff -u -p -r1.46 ospf6ctl.c
> --- ospf6ctl/ospf6ctl.c 12 Aug 2017 22:09:54 -0000 1.46
> +++ ospf6ctl/ospf6ctl.c 5 Nov 2017 14:37:40 -0000
> @@ -232,10 +232,14 @@ main(int argc, char *argv[])
>   done = 1;
>   break;
>   case RELOAD:
> +#ifdef notyet
>   imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
>   printf("reload request sent.\n");
>   done = 1;
>   break;
> +#else
> + errx(1, "reload not supported");
> +#endif
>   }
>  
>   while (ibuf->w.queued)
> Index: ospf6d/ospf6d.c
> ===================================================================
> RCS file: /d/cvs/src/usr.sbin/ospf6d/ospf6d.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 ospf6d.c
> --- ospf6d/ospf6d.c 12 Aug 2017 16:27:50 -0000 1.34
> +++ ospf6d/ospf6d.c 5 Nov 2017 14:36:08 -0000
> @@ -561,6 +561,7 @@ ospf_redistribute(struct kroute *kr, u_i
>  int
>  ospf_reload(void)
>  {
> +#ifdef notyet
>   struct area *area;
>   struct ospfd_conf *xconf;
>  
> @@ -586,6 +587,9 @@ ospf_reload(void)
>   /* update redistribute lists */
>   kr_reload();
>   return (0);
> +#else
> + return (-1);
> +#endif
>  }
>  
>  int
>
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
>

Reply | Threaded
Open this post in threaded view
|

Re: forbid config reloads in ospf6d

Sebastian Benoit-3
In reply to this post by Jeremie Courreges-Anglas-2

yep, ok

Jeremie Courreges-Anglas([hidden email]) on 2017.11.05 15:50:42 +0100:

>
> ospf6d consistently fails when I ask it to reload its config, even
> though I have a very basic test setup:
>
> area 0.0.0.0 {
>         interface em0 { passive }
>         interface vether0
> }
>
> Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
> seem to be a sufficient incentive, so I propose to disable reloading
> until it is fixed.
>
> Just a suggestion, objections (and oks) welcome.
>
>
> Index: ospf6ctl/ospf6ctl.c
> ===================================================================
> RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v
> retrieving revision 1.46
> diff -u -p -r1.46 ospf6ctl.c
> --- ospf6ctl/ospf6ctl.c 12 Aug 2017 22:09:54 -0000 1.46
> +++ ospf6ctl/ospf6ctl.c 5 Nov 2017 14:37:40 -0000
> @@ -232,10 +232,14 @@ main(int argc, char *argv[])
>   done = 1;
>   break;
>   case RELOAD:
> +#ifdef notyet
>   imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0);
>   printf("reload request sent.\n");
>   done = 1;
>   break;
> +#else
> + errx(1, "reload not supported");
> +#endif
>   }
>  
>   while (ibuf->w.queued)
> Index: ospf6d/ospf6d.c
> ===================================================================
> RCS file: /d/cvs/src/usr.sbin/ospf6d/ospf6d.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 ospf6d.c
> --- ospf6d/ospf6d.c 12 Aug 2017 16:27:50 -0000 1.34
> +++ ospf6d/ospf6d.c 5 Nov 2017 14:36:08 -0000
> @@ -561,6 +561,7 @@ ospf_redistribute(struct kroute *kr, u_i
>  int
>  ospf_reload(void)
>  {
> +#ifdef notyet
>   struct area *area;
>   struct ospfd_conf *xconf;
>  
> @@ -586,6 +587,9 @@ ospf_reload(void)
>   /* update redistribute lists */
>   kr_reload();
>   return (0);
> +#else
> + return (-1);
> +#endif
>  }
>  
>  int
>
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
>

Reply | Threaded
Open this post in threaded view
|

Re: forbid config reloads in ospf6d

Jeremie Courreges-Anglas-2
In reply to this post by Jeremie Courreges-Anglas-2
On Sun, Nov 05 2017, Jeremie Courreges-Anglas <[hidden email]> wrote:

> ospf6d consistently fails when I ask it to reload its config, even
> though I have a very basic test setup:
>
> area 0.0.0.0 {
>         interface em0 { passive }
>         interface vether0
> }
>
> Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
> seem to be a sufficient incentive, so I propose to disable reloading
> until it is fixed.
>
> Just a suggestion, objections (and oks) welcome.

It's in.  As pointed out by jmc@, ospfctl(8) ought to be adjusted.
Instead of deleting the documentation for this command, I'm just
mentioning that it is disabled.  Thoughts / ok?


Index: ospf6ctl.8
===================================================================
RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.8,v
retrieving revision 1.10
diff -u -p -p -u -r1.10 ospf6ctl.8
--- ospf6ctl.8 27 Jul 2015 18:48:05 -0000 1.10
+++ ospf6ctl.8 5 Nov 2017 17:17:24 -0000
@@ -64,6 +64,7 @@ Disable verbose debug logging.
 Enable verbose debug logging.
 .It Cm reload
 Reload the configuration file.
+This command currently has no effect.
 .It Cm show database Op Ar filter
 Show the link state database.
 .Ar filter

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: forbid config reloads in ospf6d

Jason McIntyre-2
On Sun, Nov 05, 2017 at 06:19:12PM +0100, Jeremie Courreges-Anglas wrote:

> On Sun, Nov 05 2017, Jeremie Courreges-Anglas <[hidden email]> wrote:
> > ospf6d consistently fails when I ask it to reload its config, even
> > though I have a very basic test setup:
> >
> > area 0.0.0.0 {
> >         interface em0 { passive }
> >         interface vether0
> > }
> >
> > Fixing ospf6d doesn't seem trivial.  Having it fail and exit doesn't
> > seem to be a sufficient incentive, so I propose to disable reloading
> > until it is fixed.
> >
> > Just a suggestion, objections (and oks) welcome.
>
> It's in.  As pointed out by jmc@, ospfctl(8) ought to be adjusted.
> Instead of deleting the documentation for this command, I'm just
> mentioning that it is disabled.  Thoughts / ok?
>

either that or just comment it out. ok from me either way.
jmc

>
> Index: ospf6ctl.8
> ===================================================================
> RCS file: /d/cvs/src/usr.sbin/ospf6ctl/ospf6ctl.8,v
> retrieving revision 1.10
> diff -u -p -p -u -r1.10 ospf6ctl.8
> --- ospf6ctl.8 27 Jul 2015 18:48:05 -0000 1.10
> +++ ospf6ctl.8 5 Nov 2017 17:17:24 -0000
> @@ -64,6 +64,7 @@ Disable verbose debug logging.
>  Enable verbose debug logging.
>  .It Cm reload
>  Reload the configuration file.
> +This command currently has no effect.
>  .It Cm show database Op Ar filter
>  Show the link state database.
>  .Ar filter
>
> --
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE