You should get something for that cough.
Here is a link with video of the full exchange.
https://www.nytimes.com/2018/06/14/us/politics/white-house-defends-trumps-north-korea-salute.html
They were in a receiving line and Trump extended his hand to shake the hand of the general. The general saluted Trump. It is proper military courtesy that Trump returned the salute.
In Obama's case,
Obama initiated the bow to the Saudi King. The
bow was not returned by the Saudi King. Big difference.
Had Trump initiated the salute, it would have been another story.
In the moment, I believe Trump did the right thing. However, it was a bit of a screw up in that we allowed him to be put in the situation. The NKs have a notorious and evil record of human rights violations of which the military has taken part in. A condition of the summit should have excluded the military. Then again, that is dicey with the NKs because many of their state officials wear uniforms. Everybody seems to be a general.