ospf6d: don't run DR election early on "ipv6 ospf6 priority"

On changing the router priority, DR election should only be run when it
was completed at least once before.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 111b929..c692f2c 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -1333,7 +1333,10 @@
 
   oi->priority = strtol (argv[0], NULL, 10);
 
-  if (oi->area)
+  if (oi->area &&
+      (oi->state == OSPF6_INTERFACE_DROTHER ||
+       oi->state == OSPF6_INTERFACE_BDR ||
+       oi->state == OSPF6_INTERFACE_DR))
     ospf6_interface_state_change (dr_election (oi), oi);
 
   return CMD_SUCCESS;